Consolidate tree processing
- Only build treeview once, destroy/create child content on change - Single recursive AddTree(IObject3D) method handles all nodes - BuildTree caller assigns node.TreeView instance on root node - MatterHackers/MCCentral#3483 Differing construction implementations results in inconsistent TreeNodes
This commit is contained in:
parent
9e69b4a915
commit
5244025ae3
5 changed files with 48 additions and 70 deletions
|
|
@ -378,7 +378,14 @@ namespace MatterHackers.MatterControl.CustomWidgets.TreeView
|
|||
// A TreeView that represents the parent tree view that the
|
||||
// tree node is assigned to, or null if the node has not been assigned to a tree
|
||||
// view.
|
||||
public virtual TreeView TreeView => NodeParent.TreeView;
|
||||
|
||||
private TreeView _treeView;
|
||||
|
||||
public virtual TreeView TreeView
|
||||
{
|
||||
get => _treeView ?? NodeParent.TreeView;
|
||||
set => _treeView = value;
|
||||
}
|
||||
|
||||
private void OnImageChanged(EventArgs args)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue