Fix wxNullVariant handling in wxDataViewBitmapRenderer
In both the generic and GTK+ implementations, setting the value of a bitmap column to wxNullVariant resulted in the bitmap, if set for some rows, being repeated on the rows with null value.
This commit is contained in:
@@ -1141,9 +1141,18 @@ wxDataViewBitmapRenderer::wxDataViewBitmapRenderer( const wxString &varianttype,
|
|||||||
bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
|
bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
|
||||||
{
|
{
|
||||||
if (value.GetType() == wxT("wxBitmap"))
|
if (value.GetType() == wxT("wxBitmap"))
|
||||||
|
{
|
||||||
m_bitmap << value;
|
m_bitmap << value;
|
||||||
if (value.GetType() == wxT("wxIcon"))
|
}
|
||||||
|
else if (value.GetType() == wxT("wxIcon"))
|
||||||
|
{
|
||||||
m_icon << value;
|
m_icon << value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_icon = wxNullIcon;
|
||||||
|
m_bitmap = wxNullBitmap;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -2432,7 +2432,7 @@ bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
SetPixbufProp(m_renderer, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user