* TreeNodeCollection.cs: If we are clearing the root node we
authorJackson Harper <jackson@novell.com>
Wed, 22 Mar 2006 04:22:08 +0000 (04:22 -0000)
committerJackson Harper <jackson@novell.com>
Wed, 22 Mar 2006 04:22:08 +0000 (04:22 -0000)
        * need
        to reset top_node so calcs can still happen.

svn path=/trunk/mcs/; revision=58279

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeNodeCollection.cs

index 7b03019ccc085df92e3d224d653d892b30e7eb05..f3d516dbe85bdb4f405e2c26172d4a3164f4f5d0 100644 (file)
@@ -2,6 +2,8 @@
 
        * TabControl.cs: Remove the call to ProcessKeyEventArgs and let
        control handle this.
+       * TreeNodeCollection.cs: If we are clearing the root node we need
+       to reset top_node so calcs can still happen.
 
 2006-03-21  Jackson Harper  <jackson@ximian.com>
 
index 89b3bf75f1c4e983896af26b6e674aeb1d952c66..09a29fb7af643ea62264ec5026fd1b3edc6507f0 100644 (file)
@@ -161,6 +161,8 @@ namespace System.Windows.Forms {
                        TreeView tree_view = null;
                        if (owner != null) {
                                tree_view = owner.TreeView;
+                               if (owner.IsRoot)
+                                       tree_view.top_node = null;
                                if (tree_view != null)
                                        tree_view.UpdateBelow (owner);
                        }