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:
parent
f4445caba3
commit
ae93a83e76
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user