Author: everaldo
Date: 2007-05-11 05:25:37 -0400 (Fri, 11 May 2007)
New Revision: 77220

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
        * ToolBar.cs: Check for handle created in redraw to prevent unneeded 
size
        calculations, it reduces the size cauculation from 7 to 3 on a toolbar 
with
        3 buttons.

2007-05-11  Everaldo Canuto  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-11 09:24:59 UTC (rev 77219)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-11 09:25:37 UTC (rev 77220)
@@ -1,5 +1,11 @@
 2007-05-11  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * ToolBar.cs: Check for handle created in redraw to prevent unneeded 
size
+       calculations, it reduces the size cauculation from 7 to 3 on a toolbar 
with
+       3 buttons.
+
+2007-05-11  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * ToolBar.cs: Save default_size on create handle to use later for 
buttons
        without text, needed to mimic win32 behavior.
 

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-11 09:24:59 UTC (rev 77219)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2007-05-11 09:25:37 UTC (rev 77220)
@@ -840,6 +840,9 @@
 
                internal void Redraw (bool recalculate, bool force)
                {
+                       if (!IsHandleCreated)
+                               return;
+
                        bool invalidate = true;
                        
                        if (recalculate)

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

Reply via email to