Author: calberto
Date: 2007-10-05 20:36:41 -0400 (Fri, 05 Oct 2007)
New Revision: 87023

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
Log:
        * TreeView.cs: When Keys.Left is pressed, before trying to Collapse
        check that the node actually has nodes, and if not, move to the
        parent node instead. 
        Fixes #325265.

2006-10-05  Carlos Alberto Cortez <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-10-06 00:29:57 UTC (rev 87022)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-10-06 00:36:41 UTC (rev 87023)
@@ -1,5 +1,12 @@
 2006-10-05  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
+       * TreeView.cs: When Keys.Left is pressed, before trying to Collapse
+       check that the node actually has nodes, and if not, move to the
+       parent node instead. 
+       Fixes #325265.
+
+2006-10-05  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
        * TreeView.cs: Move the previous change to the general case (to
        call Application.DoEvents in cases where the method was called by
        different places).

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-10-06 00:29:57 UTC (rev 87022)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-10-06 00:36:41 UTC (rev 87023)
@@ -908,7 +908,7 @@
                                break;
                        case Keys.Left:
                                if (selected_node != null) {
-                                       if (selected_node.IsExpanded)
+                                       if (selected_node.IsExpanded && 
selected_node.Nodes.Count > 0)
                                                selected_node.Collapse ();
                                        else {
                                                TreeNode parent = 
selected_node.Parent;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to