* Control.cs (SelectNextControl): When checking the control's
authorJackson Harper <jackson@novell.com>
Mon, 10 Jul 2006 10:48:44 +0000 (10:48 -0000)
committerJackson Harper <jackson@novell.com>
Mon, 10 Jul 2006 10:48:44 +0000 (10:48 -0000)
        parent use this instead of ctrl.parent so that null can be
passed
        to SelectNextControl. (I have unit tests for this).
        - Remove unused var.

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

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

index 7a098ba034929b6cc9202e199f6a2f8d2a38fbc3..4482a824e638e811d11f75e9fb63d67d8f9e92db 100644 (file)
@@ -1,3 +1,10 @@
+2006-07-10  Jackson Harper  <jackson@ximian.com>
+
+       * Control.cs (SelectNextControl): When checking the control's
+       parent use this instead of ctrl.parent so that null can be passed
+       to SelectNextControl. (I have unit tests for this).
+       - Remove unused var.
+
 2006-07-07  Alexander Olk  <alex.olk@googlemail.com>
 
        * FileDialog.cs: Don't use brackets for new folders if they exist
index e635e78ab2426662e9091ab06024da514a25bfa2..2fedb767de620aecc59ad368262e29ce33c235d2 100644 (file)
@@ -939,15 +939,12 @@ namespace System.Windows.Forms
                }
 
                internal bool Select(Control control) {
-                       Control                 parent;
                        IContainerControl       container;
 
                        if (control == null) {
                                return false;
                        }
 
-                       parent = control.parent;
-
                        control.is_selected = true;
 
                        container = GetContainerControl();
@@ -3124,7 +3121,7 @@ namespace System.Windows.Forms
                                        break;
                                }
 
-                               if (c.CanSelect && ((c.parent == ctl.parent) || nested) && (c.tab_stop || !tabStopOnly)) {
+                               if (c.CanSelect && ((c.parent == this) || nested) && (c.tab_stop || !tabStopOnly)) {
                                        Select(c);
                                        return true;
                                }