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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user