Revert "Remove unused code in wxGTK wxAnyButton"
This reverts commit 4e366b2cfb
as it the
code removed by it is still needed and removing it results in unit test
failures in wxBitmapToggleButton unit tests with both GTK 2 and 3.
See https://github.com/wxWidgets/wxWidgets/pull/2548
This commit is contained in:
@@ -186,7 +186,10 @@ void wxAnyButton::GTKDoShowBitmap(const wxBitmap& bitmap)
|
||||
{
|
||||
wxCHECK_RET(bitmap.IsOk(), "invalid bitmap");
|
||||
|
||||
GtkWidget* const image = gtk_button_get_image(GTK_BUTTON(m_widget));
|
||||
GtkWidget* image = gtk_button_get_image(GTK_BUTTON(m_widget));
|
||||
if (image == NULL)
|
||||
image = gtk_bin_get_child(GTK_BIN(m_widget));
|
||||
|
||||
wxCHECK_RET(WX_GTK_IS_IMAGE(image), "must have image widget");
|
||||
|
||||
WX_GTK_IMAGE(image)->Set(bitmap);
|
||||
|
Reference in New Issue
Block a user