* TreeView.cs: We must use the comparer supplied by TreeViewNodeSorter
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Wed, 14 Apr 2010 13:35:15 +0000 (13:35 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Wed, 14 Apr 2010 13:35:15 +0000 (13:35 -0000)
*always*, since it is used recursively, so checking for a number of
top level nodes is useless. This should fix a case where we were not
sorting any node with a single root node.

2010-04-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>

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

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

index d4de2591a297f43e923541593cfe864fc6db0dd2..cd33186693f1a7a4c47bf814f6f801d6f8bc500b 100644 (file)
@@ -1,3 +1,10 @@
+2010-04-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: We must use the comparer supplied by TreeViewNodeSorter
+       *always*, since it is used recursively, so checking for a number of
+       top level nodes is useless. This should fix a case where we were not
+       sorting any node with a single root node.
+
 2010-04-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * DataGridView.cs: Call the base Paint impl last, instead of do that
index 313d67f5b055360c95a0e2ddabfde17ef842ec17..62ffac36ce37a215a8232c50eeb12dd60a9476d9 100644 (file)
@@ -751,7 +751,7 @@ namespace System.Windows.Forms {
 #if NET_2_0
                public  void Sort ()
                {
-                       Sort (Nodes.Count >= 2 ? tree_view_node_sorter : null);
+                       Sort (tree_view_node_sorter);
                }
 #endif