Browse Source

Fixed bug in node removal - the removed node was left in invalid state.

This only caused problems if the node was later added back.
pull/6/merge
David Srbecký 13 years ago
parent
commit
0fb7f129c8
  1. 2
      src/Libraries/SharpTreeView/ICSharpCode.TreeView/FlatListTreeNode.cs

2
src/Libraries/SharpTreeView/ICSharpCode.TreeView/FlatListTreeNode.cs

@ -364,6 +364,8 @@ namespace ICSharpCode.TreeView @@ -364,6 +364,8 @@ namespace ICSharpCode.TreeView
Debug.Assert(node.listParent == null);
Debug.Assert(node.left == null);
Debug.Assert(node.right == null);
node.height = 1;
node.totalListLength = -1;
if (balancingNode != null)
RebalanceUntilRoot(balancingNode);
}

Loading…
Cancel
Save