diff options
Diffstat (limited to 'mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs index da16b149ad..4df3397908 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs @@ -315,12 +315,9 @@ namespace System.Windows.Forms protected override void OnMouseUp (MouseEventArgs e) { if (this.close_on_mouse_release) { - this.DropDown.Dismiss (ToolStripDropDownCloseReason.ItemClicked); + this.Parent.Dismiss (ToolStripDropDownCloseReason.ItemClicked); this.Invalidate (); this.close_on_mouse_release = false; - - if (!this.IsOnDropDown && this.Parent is MenuStrip) - (this.Parent as MenuStrip).MenuDroppedDown = false; } if (!this.HasDropDownItems && Enabled) |