summaryrefslogtreecommitdiff
path: root/wx+/bitmap_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'wx+/bitmap_button.h')
-rw-r--r--wx+/bitmap_button.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h
index 5674f66b..4e5adb87 100644
--- a/wx+/bitmap_button.h
+++ b/wx+/bitmap_button.h
@@ -74,7 +74,13 @@ inline
void setImage(wxBitmapButton& button, const wxBitmap& bmp)
{
if (!isEqual(button.GetBitmapLabel(), bmp))
+ {
button.SetBitmapLabel(bmp);
+
+ //wxWidgets excels at screwing up consistently once again:
+ //the first call to SetBitmapLabel() *implicitly* sets the disabled bitmap, too, subsequent calls, DON'T!
+ button.SetBitmapDisabled(bmp.ConvertToDisabled()); //inefficiency: wxBitmap::ConvertToDisabled() implicitly converts to wxImage!
+ }
}
}
bgstack15