Author: mkestner
Date: 2006-07-19 11:31:55 -0400 (Wed, 19 Jul 2006)
New Revision: 62752

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
Log:

2006-07-19  Mike Kestner  <[EMAIL PROTECTED]>

        * ListBox.cs: Sort on collection changes even if the handle
        isn't created yet.  Fixes #78813.


Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-07-19 15:29:13 UTC (rev 62751)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-07-19 15:31:55 UTC (rev 62752)
@@ -1,3 +1,8 @@
+2006-07-19  Mike Kestner  <[EMAIL PROTECTED]>
+
+       * ListBox.cs: Sort on collection changes even if the handle
+       isn't created yet.  Fixes #78813.
+
 2006-07-18  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * ListControl.cs: DisplayMember should never be null,

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs       
2006-07-19 15:29:13 UTC (rev 62751)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs       
2006-07-19 15:31:55 UTC (rev 62752)
@@ -1764,12 +1764,12 @@
 
                internal virtual void CollectionChanged ()
                {
+                       if (sorted) 
+                               Sort ();                                
+
                        if (!IsHandleCreated || suspend_layout)
                                return;
 
-                       if (sorted) 
-                               Sort ();                                
-
                        Layout ();
 
                        if (Items.Count == 0) {

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

Reply via email to