Author: mkestner
Date: 2006-11-09 16:08:34 -0500 (Thu, 09 Nov 2006)
New Revision: 67644
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
Log:
2006-11-09 Mike Kestner <[EMAIL PROTECTED]>
* ListView.cs : raise SelectedIndexChanged when a selected item is
removed from the item collection using Remove or RemoveAt.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-09 21:05:19 UTC (rev 67643)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-09 21:08:34 UTC (rev 67644)
@@ -1,7 +1,7 @@
2006-11-09 Mike Kestner <[EMAIL PROTECTED]>
* ListView.cs : raise SelectedIndexChanged when a selected item is
- removed from the item collection.
+ removed from the item collection using Remove or RemoveAt.
2006-11-09 Mike Kestner <[EMAIL PROTECTED]>
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 21:05:19 UTC (rev 67643)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2006-11-09 21:08:34 UTC (rev 67644)
@@ -3091,9 +3091,12 @@
{
if (index < 0 || index >= Count)
throw new ArgumentOutOfRangeException
("index");
+ bool selection_changed =
owner.SelectedIndices.Contains (index);
list.RemoveAt (index);
OnChange ();
owner.Redraw (false);
+ if (selection_changed)
+ owner.OnSelectedIndexChanged
(EventArgs.Empty);
}
#endregion // Public Methods
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches