Author: everaldo
Date: 2007-05-23 11:24:39 -0400 (Wed, 23 May 2007)
New Revision: 77842
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
2007-05-22 Everaldo Canuto <[EMAIL PROTECTED]>
* ToolBar.cs: Prevent context menu to be typed as MainMenu. Fixes
#81675.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-23 15:18:43 UTC (rev 77841)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-23 15:24:39 UTC (rev 77842)
@@ -1,3 +1,7 @@
+2007-05-22 Everaldo Canuto <[EMAIL PROTECTED]>
+
+ * ToolBar.cs: Prevent context menu to be typed as MainMenu. Fixes
#81675.
+
2007-05-22 Andreia Gaita <[EMAIL PROTECTED]>
* NumericUpDown.cs: Fix PieChart by not returning from UpdateEditText
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
2007-05-23 15:18:43 UTC (rev 77841)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
2007-05-23 15:24:39 UTC (rev 77842)
@@ -495,12 +495,14 @@
if (e.Button.DropDownMenu == null)
return;
- Point loc = new Point (current_item.Rectangle.X + 1,
current_item.Rectangle.Bottom + 1);
+ ToolBarItem item = current_item;
+
+ Point loc = new Point (item.Rectangle.X + 1,
item.Rectangle.Bottom + 1);
((ContextMenu) e.Button.DropDownMenu).Show (this, loc);
- current_item.DDPressed = false;
- current_item.Hilight = false;
- Invalidate (current_item.Rectangle);
+ item.DDPressed = false;
+ item.Hilight = false;
+ item.Invalidate ();
}
protected override void OnFontChanged (EventArgs e)
@@ -554,7 +556,7 @@
#region Private Methods
private void FocusChanged (object sender, EventArgs args)
- {
+ {return;
if (Appearance != ToolBarAppearance.Flat ||
Buttons.Count == 0)
return;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches