]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbmp.cpp
make sure we are comparing the stripped strings
[wxWidgets.git] / src / msw / statbmp.cpp
index 14adf39e01d5b42382bfc6bd70b297cb1bab1a12..a584ebac96c1efb4be93bc6530834ea03f43a3c2 100644 (file)
@@ -167,6 +167,9 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     // no need to delete the new image
     SetImageNoCopy(image);
 
+    // GetBestSize will work properly now, so set the best size if needed
+    SetBestSize(size);
+    
     return TRUE;
 }
 
@@ -201,6 +204,15 @@ void wxStaticBitmap::Free()
     m_image = NULL;
 }
 
+wxSize wxStaticBitmap::DoGetBestSize() const
+{
+    if ( ImageIsOk() )
+        return wxSize(m_image->GetWidth(), m_image->GetHeight());
+
+    // this is completely arbitrary
+    return wxSize(16, 16);
+}
+
 void wxStaticBitmap::SetImage( const wxGDIImage* image )
 {
     wxGDIImage* convertedImage = ConvertImage( *image );