Browse Source

SharpTreeView: Disable expensive checks to make debug builds a bit faster.

pull/10/head
Daniel Grunwald 15 years ago
parent
commit
8d82bf11b4
  1. 2
      SharpTreeView/FlatListTreeNode.cs
  2. 4
      SharpTreeView/SharpTreeNode.cs

2
SharpTreeView/FlatListTreeNode.cs

@ -48,7 +48,7 @@ namespace ICSharpCode.TreeView @@ -48,7 +48,7 @@ namespace ICSharpCode.TreeView
GetListRoot().CheckInvariants();
}
[Conditional("DEBUG")]
[Conditional("DATACONSISTENCYCHECK")]
void CheckInvariants()
{
Debug.Assert(left == null || left.listParent == this);

4
SharpTreeView/SharpTreeNode.cs

@ -150,7 +150,7 @@ namespace ICSharpCode.TreeView @@ -150,7 +150,7 @@ namespace ICSharpCode.TreeView
#endregion
#region OnChildrenChanged
internal void OnChildrenChanged(NotifyCollectionChangedEventArgs e)
internal protected virtual void OnChildrenChanged(NotifyCollectionChangedEventArgs e)
{
if (e.OldItems != null) {
foreach (SharpTreeNode node in e.OldItems) {
@ -189,7 +189,7 @@ namespace ICSharpCode.TreeView @@ -189,7 +189,7 @@ namespace ICSharpCode.TreeView
Debug.Assert(node.modelParent == null);
node.modelParent = this;
node.UpdateIsVisible(isVisible && isExpanded, false);
Debug.WriteLine("Inserting {0} after {1}", node, insertionPos);
//Debug.WriteLine("Inserting {0} after {1}", node, insertionPos);
while (insertionPos != null && insertionPos.modelChildren != null && insertionPos.modelChildren.Count > 0) {
insertionPos = insertionPos.modelChildren.Last();

Loading…
Cancel
Save