Author: calberto
Date: 2007-10-06 22:22:22 -0400 (Sat, 06 Oct 2007)
New Revision: 87042
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
Log:
2007-10-07 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListView.cs: When calling EndEdit (after editing an item),
create a new instance of LabelEditEventArgs to keep clean the fields
in case we get a new call to BeginEdit; also do Application.DoEvents
to have focus in synch. This is a fix similar to TreeView's #325244.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-10-07 01:51:28 UTC (rev 87041)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-10-07 02:22:22 UTC (rev 87042)
@@ -1,3 +1,10 @@
+2007-10-07 Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+ * ListView.cs: When calling EndEdit (after editing an item),
+ create a new instance of LabelEditEventArgs to keep clean the fields
+ in case we get a new call to BeginEdit; also do Application.DoEvents
+ to have focus in synch. This is a fix similar to TreeView's #325244.
+
2007-10-07 Andreia Gaita <[EMAIL PROTECTED]>
* HtmlDocument.cs, HtmlElement.cs, WebBrowser.cs: Added dom support
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2007-10-07 01:51:28 UTC (rev 87041)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2007-10-07 02:22:22 UTC (rev 87042)
@@ -2652,10 +2652,6 @@
if (edit_item == null || edit_item != item)
return;
- owner.OnAfterLabelEdit (edit_args);
- if (!edit_args.CancelEdit && edit_args.Label !=
null)
- edit_item.Text = edit_text_box.Text;
-
if (edit_text_box != null) {
if (edit_text_box.Visible)
edit_text_box.Visible = false;
@@ -2663,7 +2659,19 @@
owner.Focus ();
}
+ // Same as TreeView.EndEdit: need to have focus
in synch
+ Application.DoEvents ();
+
+ //
+ // Create a new instance, since we could get a
call to BeginEdit
+ // from the handler and have fields out of synch
+ //
+ LabelEditEventArgs args = new
LabelEditEventArgs (item.Index, edit_args.Label);
edit_item = null;
+
+ owner.OnAfterLabelEdit (args);
+ if (!args.CancelEdit && args.Label != null)
+ item.Text = args.Label;
}
internal override void OnPaintInternal (PaintEventArgs
pe)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches