Reset wxStaticBitmap image when passed empty bitmap in wxGTK

This makes the behaviour consistent with the other ports.

Closes #17420.
This commit is contained in:
Kolya Kosenko
2016-03-04 14:47:32 +01:00
committed by Vadim Zeitlin
parent 5d9c578df3
commit 59b29a3a71

View File

@@ -59,16 +59,16 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
{
m_bitmap = bitmap;
if (m_bitmap.IsOk())
{
// always use pixbuf, because pixmap mask does not
// work with disabled images in some themes
if (m_bitmap.IsOk())
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), m_bitmap.GetPixbuf());
else
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), NULL);
InvalidateBestSize();
SetSize(GetBestSize());
}
}
// static
wxVisualAttributes