Author: jackson
Date: 2007-04-24 15:16:22 -0400 (Tue, 24 Apr 2007)
New Revision: 76213

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: Set the first node to the selected node when we
        * get
        focus if there is no selected node.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-04-24 19:00:26 UTC (rev 76212)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-04-24 19:16:22 UTC (rev 76213)
@@ -1,3 +1,8 @@
+2007-04-24  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * TreeView.cs: Set the first node to the selected node when we get
+       focus if there is no selected node.
+
 2007-04-24  Andreia Gaita  <[EMAIL PROTECTED]>
 
        * MimeIcon.cs: remove using blocks so that image streams are

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-04-24 19:00:26 UTC (rev 76212)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-04-24 19:16:22 UTC (rev 76213)
@@ -1780,8 +1780,8 @@
 
                private void GotFocusHandler (object sender, EventArgs e)
                {
-                       if (selected_node == null && pre_selected_node != null)
-                               SelectedNode = pre_selected_node;
+                       if (selected_node == null)
+                               SelectedNode = pre_selected_node == null ? 
Nodes [0] : pre_selected_node;
                        else if (selected_node != null)
                                UpdateNode (selected_node);
                }

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

Reply via email to