HelpDocs
This commit is contained in:
parent
19a7fba3a6
commit
95ae04b790
9 changed files with 397 additions and 51 deletions
|
|
@ -220,6 +220,17 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
OnBeforeSelect(null);
|
||||
|
||||
if (_selectedNode != null)
|
||||
{
|
||||
// Collapse the old tree
|
||||
foreach (var ancestor in _selectedNode.Parents<TreeNode>())
|
||||
{
|
||||
ancestor.Expanded = false;
|
||||
}
|
||||
|
||||
_selectedNode.Expanded = false;
|
||||
}
|
||||
|
||||
// if the current selection (before change) is !null than clear its background color
|
||||
if (_selectedNode != null)
|
||||
{
|
||||
|
|
@ -229,11 +240,22 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
// change the selection
|
||||
_selectedNode = value;
|
||||
|
||||
if (_selectedNode != null)
|
||||
{
|
||||
// Expand the new tree
|
||||
foreach (var ancestor in _selectedNode.Parents<TreeNode>())
|
||||
{
|
||||
ancestor.Expanded = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_selectedNode != null)
|
||||
{
|
||||
_selectedNode.HighlightRegion.BackgroundColor = theme.AccentMimimalOverlay;
|
||||
}
|
||||
|
||||
|
||||
|
||||
OnAfterSelect(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue