X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b45ed7a273799b1b360482496a706a211eca6435..9513c5b609740c15322f2284e5e8b9609eeaa069:/src/mac/stattext.cpp

diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp
index 2d81d33b16..4c8b9414a4 100644
--- a/src/mac/stattext.cpp
+++ b/src/mac/stattext.cpp
@@ -233,8 +233,11 @@ void wxStaticText::SetLabel(const wxString& st )
     SetTitle( st ) ;
     m_label = st ;
     if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+    {
+        // temporary fix until layout measurement and drawing are in synch again
+        Refresh() ;
         SetSize( GetBestSize() ) ;
-
+    }
     Refresh() ;
     Update() ;
 }
@@ -243,10 +246,17 @@ bool wxStaticText::SetFont(const wxFont& font)
 {
     bool ret = wxControl::SetFont(font);
 
-    // adjust the size of the window to fit to the label unless autoresizing is
-    // disabled
-    if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
-        SetSize( GetBestSize() );
+	if ( ret )
+	{
+	    // adjust the size of the window to fit to the label unless autoresizing is
+	    // disabled
+	    if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+	    {
+	        // temporary fix until layout measurement and drawing are in synch again
+            Refresh() ;
+	        SetSize( GetBestSize() );
+	    }
+	}
 
     return ret;
 }