X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..a2c6537e60ab5564d6bf33bb14ac8c42744aa93c:/src/msw/statbmp.cpp diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index b437dcf26a..c667893ba0 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -151,10 +151,9 @@ bool wxStaticBitmap::Create(wxWindow *parent, // we may have either bitmap or icon: if a bitmap with mask is passed, we // will transform it to an icon ourselves because otherwise the mask will // be ignored by Windows - wxGDIImage *image = (wxGDIImage *)NULL; m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon)); - image = ConvertImage( bitmap ); + wxGDIImage *image = ConvertImage( bitmap ); m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) ); // create the native control @@ -217,6 +216,7 @@ void wxStaticBitmap::SetImage( const wxGDIImage* image ) { wxGDIImage* convertedImage = ConvertImage( *image ); SetImageNoCopy( convertedImage ); + InvalidateBestSize(); } void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image)