Author: calberto
Date: 2007-11-20 19:35:13 -0500 (Tue, 20 Nov 2007)
New Revision: 90055

Modified:
   
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
Log:
2007-11-20  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        [Backport to 1.2.6]
        * ListView.cs: When setting focused item, try to give focus to the
        previous one _only_ if the previous one remains valid. 
        Fixes #342504.



Modified: 
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- 
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
  2007-11-21 00:18:45 UTC (rev 90054)
+++ 
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
  2007-11-21 00:35:13 UTC (rev 90055)
@@ -1,3 +1,10 @@
+2007-11-20  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       [Backport to 1.2.6]
+       * ListView.cs: When setting focused item, try to give focus to the
+       previous one _only_ if the previous one remains valid. 
+       Fixes #342504.
+
 2007-11-20  Everaldo Canuto  <[EMAIL PROTECTED]>
        [Backport to 1.2.6]
        * ThemeWin32Classic.cs: Fix extra space on end of tooltip.

Modified: 
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- 
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
        2007-11-21 00:18:45 UTC (rev 90054)
+++ 
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
        2007-11-21 00:35:13 UTC (rev 90055)
@@ -3006,7 +3006,7 @@
                {
                        if (index != -1)
                                items [index].Focused = true;
-                       else if (focused_item_index != -1) // Previous focused 
item
+                       else if (focused_item_index != -1 && focused_item_index 
< items.Count) // Previous focused item
                                items [focused_item_index].Focused = false;
 
                        focused_item_index = index;

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

Reply via email to