Author: jpobst
Date: 2007-09-10 17:26:58 -0400 (Mon, 10 Sep 2007)
New Revision: 85608

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
Log:
2007-09-10  Jonathan Pobst  <[EMAIL PROTECTED]>

        * ToolStripMenuItem.cs: Add a parent type check so we don't crash on 
people
        who want to add a menu item directly onto a toolstrip.
        [Fixes bug #82775, part II]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-10 21:19:51 UTC (rev 85607)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-10 21:26:58 UTC (rev 85608)
@@ -1,5 +1,11 @@
 2007-09-10  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * ToolStripMenuItem.cs: Add a parent type check so we don't crash on 
people
+       who want to add a menu item directly onto a toolstrip.
+       [Fixes bug #82775, part II]
+
+2007-09-10  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * StatusStrip.cs: Synchronize SetDisplayedItems with the ToolStrip 
version.
        * ToolStrip.cs: If a ToolStripItem set to not visible is added to a 
ToolStrip,
        don't set it to available.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs 
    2007-09-10 21:19:51 UTC (rev 85607)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs 
    2007-09-10 21:26:58 UTC (rev 85608)
@@ -302,7 +302,7 @@
                                this.Invalidate ();
                                this.close_on_mouse_release = false;
                                
-                               if (!this.IsOnDropDown)
+                               if (!this.IsOnDropDown && this.Parent is 
MenuStrip)
                                        (this.Parent as 
MenuStrip).MenuDroppedDown = false;
                        }
                                

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

Reply via email to