wxGTK: Handle null bitmaps in wxDataViewBitmapRenderer

Consistently with other implementations, accept wxNullBitmap and
wxNullIcon in wxDataViewBitmapRenderer if the column shouldn't show any
icon.
This commit is contained in:
Václav Slavík 2016-10-08 16:44:30 +02:00
parent f4445caba3
commit ae93a83e76

View File

@ -2421,14 +2421,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
{