]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/statbmp.cpp
don't waste time initializing the memory of newly created wxImage before filling...
[wxWidgets.git] / src / gtk / statbmp.cpp
index 48a8dafe73e7241e5735e3dacecd62cb3755b5d3..6ec5169750287457e07e8433c6b49035c6150010 100644 (file)
@@ -113,7 +113,8 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
             gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
         }
 
-        SetBestSize(wxSize(bitmap.GetWidth(), bitmap.GetHeight()));
+        InvalidateBestSize();
+        SetSize(GetBestSize());
     }
 }