2010-06-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Thu, 24 Jun 2010 15:38:55 +0000 (15:38 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Thu, 24 Jun 2010 15:38:55 +0000 (15:38 -0000)
* TabControl.cs: Don't set SelectedTabIndex when getting the focus *at
all*.
Fixes #613765.

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

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

index f459df704c7581abb1d77ae078a659d2e476bf9d..094591baf3c83ee8f6a82f2e56bf95d7d58dab7c 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TabControl.cs: Don't set SelectedTabIndex when getting the focus *at
+       all*.
+       Fixes #613765.
+
 2010-06-24  Dick Porter  <dporter@codicesoftware.com>
 
        * Fix NullReferenceException when keyboard shortcut activates
index d31a66c923b8db65fe9f91f1e5a0c815d758b111..6e2018c9e720fec314b6146c004cea686a8cf5fc 100644 (file)
@@ -956,8 +956,6 @@ namespace System.Windows.Forms {
                {
                        switch ((Msg)m.Msg) {
                        case Msg.WM_SETFOCUS:
-                               if (selected_index == -1 && this.TabCount > 0)
-                                       this.SelectedIndex = 0;
                                if (selected_index != -1)
                                        Invalidate(GetTabRect(selected_index));
                                base.WndProc (ref m);