wxGTK: Handle null bitmaps in wxDataViewBitmapRenderer

Consistently with other implementations, accept wxNullBitmap and
wxNullIcon in wxDataViewBitmapRenderer if the column shouldn't show any
icon.

(cherry picked from commit ae93a83e76)
This commit is contained in:
Václav Slavík
2016-10-08 16:44:30 +02:00
parent 2a21297d41
commit 4e7f160100

View File

@@ -2277,14 +2277,14 @@ bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
// GetPixbuf() may create a Pixbuf representation in the wxBitmap
// object (and it will stay there and remain owned by wxBitmap)
SetPixbufProp(m_renderer, bitmap.GetPixbuf());
SetPixbufProp(m_renderer, bitmap.IsOk() ? bitmap.GetPixbuf() : NULL);
}
else if (value.GetType() == wxT("wxIcon"))
{
wxIcon icon;
icon << value;
SetPixbufProp(m_renderer, icon.GetPixbuf());
SetPixbufProp(m_renderer, icon.IsOk() ? icon.GetPixbuf() : NULL);
}
else
{