From 2cae38502faa86c22b523626bc6629e37f150c0f Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 5 Jan 2022 23:20:42 +0100 Subject: [PATCH] Fix wxGenericColourButton bitmaps for different button states Only the bitmap of the normal state was updated, not of the other (focused, hover, disabled, etc) states. This became obvious after ee93f4cae8, but already happened before that for the disabled state. Invalidate the bitmapButton using wxNullBitmap, so all states will be updated when setting the bitmap. --- src/generic/clrpickerg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/generic/clrpickerg.cpp b/src/generic/clrpickerg.cpp index 1f62aa49ac..bca1504828 100644 --- a/src/generic/clrpickerg.cpp +++ b/src/generic/clrpickerg.cpp @@ -149,6 +149,8 @@ void wxGenericColourButton::UpdateColour() } dc.SelectObject( wxNullBitmap ); + + SetBitmapLabel( wxNullBitmap ); SetBitmapLabel( m_bitmap ); }