Author: jpobst
Date: 2007-09-07 10:17:58 -0400 (Fri, 07 Sep 2007)
New Revision: 85477

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

        * ToolStrip.cs: Make sure we aren't drawing anything that isn't 
        visible.  [Fixes bug #82727]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-07 14:00:50 UTC (rev 85476)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-07 14:17:58 UTC (rev 85477)
@@ -1,3 +1,8 @@
+2007-09-07  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * ToolStrip.cs: Make sure we aren't drawing anything that isn't 
+       visible.  [Fixes bug #82727]
+
 2007-09-06  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * ToolStripItem.cs: If AutoSize changes the size of our item, invalidate

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs     
2007-09-07 14:00:50 UTC (rev 85476)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs     
2007-09-07 14:17:58 UTC (rev 85477)
@@ -964,9 +964,11 @@
 
                        // Make each item draw itself
                        foreach (ToolStripItem tsi in this.displayed_items) {
-                               e.Graphics.TranslateTransform (tsi.Bounds.Left, 
tsi.Bounds.Top);
-                               tsi.FireEvent (e, ToolStripItemEventType.Paint);
-                               e.Graphics.ResetTransform ();
+                               if (tsi.Visible) {
+                                       e.Graphics.TranslateTransform 
(tsi.Bounds.Left, tsi.Bounds.Top);
+                                       tsi.FireEvent (e, 
ToolStripItemEventType.Paint);
+                                       e.Graphics.ResetTransform ();
+                               }
                        }
 
                        // Paint the Overflow button if it's visible

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

Reply via email to