Author: mkestner
Date: 2006-11-09 16:05:19 -0500 (Thu, 09 Nov 2006)
New Revision: 67643

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
Log:

2006-11-09  Mike Kestner  <[EMAIL PROTECTED]>

        * ListView.cs : raise SelectedIndexChanged when a selected item is
        removed from the item collection.


Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-09 20:46:28 UTC (rev 67642)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-09 21:05:19 UTC (rev 67643)
@@ -1,5 +1,10 @@
 2006-11-09  Mike Kestner  <[EMAIL PROTECTED]>
 
+       * ListView.cs : raise SelectedIndexChanged when a selected item is
+       removed from the item collection.
+
+2006-11-09  Mike Kestner  <[EMAIL PROTECTED]>
+
        * ListView.cs : raise SelectedIndexChanged once per selected item
        for compat with MS.  Fixes #79849+.
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs      
2006-11-09 20:46:28 UTC (rev 67642)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs      
2006-11-09 21:05:19 UTC (rev 67643)
@@ -3079,9 +3079,12 @@
                                if (!list.Contains (item))
                                        return;
                                        
+                               bool selection_changed = 
owner.SelectedItems.Contains (item);
                                list.Remove (item);
                                OnChange ();
                                owner.Redraw (true);                            
+                               if (selection_changed)
+                                       owner.OnSelectedIndexChanged 
(EventArgs.Empty);
                        }
 
                        public virtual void RemoveAt (int index)

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
        2006-11-09 20:46:28 UTC (rev 67642)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
        2006-11-09 21:05:19 UTC (rev 67643)
@@ -266,7 +266,6 @@
                }
 
                [Test]
-               [Category ("NotWorking")]
                public void RemoveSelectedItem ()
                {
                        Form form = new Form ();

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

Reply via email to