]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes #13443, thanks :-)
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 1 Sep 2011 16:20:24 +0000 (16:20 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 1 Sep 2011 16:20:24 +0000 (16:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/button.mm
src/osx/cocoa/window.mm

index fa8938295dfdc509d1c6484b390e5bb88f1871da..3e4288ba8e4debc5134e0aa92857aa3b6e273cb5 100644 (file)
@@ -95,9 +95,16 @@ public:
     virtual void SetBitmap(const wxBitmap& bitmap)
     {
         // switch bezel style for plain pushbuttons
-        if ( bitmap.IsOk() && [GetNSButton() bezelStyle] == NSRoundedBezelStyle )
-            [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle ];
-
+        if ( bitmap.IsOk() )
+        {
+            if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle)
+                [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle];
+        }
+        else
+        {
+            [GetNSButton() setBezelStyle:NSRoundedBezelStyle];
+        }
+        
         wxWidgetCocoaImpl::SetBitmap(bitmap);
     }
 
index 76fd98719de5d805022e44a7d7b1ee375c8bce1c..26c705fcdd041ee8412c6b0b251681260d5de06b 100644 (file)
@@ -1955,7 +1955,11 @@ void wxWidgetCocoaImpl::SetBitmap( const wxBitmap& bitmap )
 {
     if (  [m_osxView respondsToSelector:@selector(setImage:)] )
     {
-        [m_osxView setImage:bitmap.GetNSImage()];
+        if (bitmap.IsOk())
+            [m_osxView setImage:bitmap.GetNSImage()];
+        else
+            [m_osxView setImage:nil];
+
         [m_osxView setNeedsDisplay:YES];
     }
 }