Author: rolf
Date: 2007-02-19 15:06:04 -0500 (Mon, 19 Feb 2007)
New Revision: 73131

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

        * ListControl.cs: In SelectedValue use value.Equals to compare for
        equality instead of ==, otherwise it will fail for strings.
        Fixes #80794.

2007-02-19  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 


Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-02-19 19:55:57 UTC (rev 73130)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-02-19 20:06:04 UTC (rev 73131)
@@ -1,4 +1,10 @@
 2007-02-19  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * ListControl.cs: In SelectedValue use value.Equals to compare for
+       equality instead of ==, otherwise it will fail for strings.
+       Fixes #80794.
+
+2007-02-19  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
        
        * ComboBox.cs: Switch the order to ShowSelection and ActivateCaret,
        since the caret won't show up unless ShowSelection is true. 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs   
2007-02-19 19:55:57 UTC (rev 73130)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs   
2007-02-19 20:06:04 UTC (rev 73131)
@@ -183,7 +183,7 @@
                                        PropertyDescriptor prop = col.Find 
(ValueMember, true);
                                                                                
                                        for (int i = 0; i < data_manager.Count; 
i++) {
-                                                if (prop.GetValue 
(data_manager [i]) == value) {
+                                               if (value.Equals (prop.GetValue 
(data_manager [i]))) {
                                                        SelectedIndex = i;
                                                        return;
                                                }

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

Reply via email to