Don't warn if model cell value is empty in wxGTK wxDVC.
Make wxGTK consistent with the generic version and, generally speaking, more reasonable by allowing to leave any cell empty by just not filling in the wxVariant in the model GetValue() for it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2911,6 +2911,10 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *WXUNUSED(column),
|
|||||||
wxVariant value;
|
wxVariant value;
|
||||||
wx_model->GetValue( value, item, cell->GetOwner()->GetModelColumn() );
|
wx_model->GetValue( value, item, cell->GetOwner()->GetModelColumn() );
|
||||||
|
|
||||||
|
// It is always possible to leave a cell empty, don't warn about type
|
||||||
|
// mismatch in this case.
|
||||||
|
if (!value.IsNull())
|
||||||
|
{
|
||||||
if (value.GetType() != cell->GetVariantType())
|
if (value.GetType() != cell->GetVariantType())
|
||||||
{
|
{
|
||||||
wxLogDebug("Wrong type returned from the model: "
|
wxLogDebug("Wrong type returned from the model: "
|
||||||
@@ -2918,6 +2922,7 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *WXUNUSED(column),
|
|||||||
cell->GetVariantType(),
|
cell->GetVariantType(),
|
||||||
value.GetType());
|
value.GetType());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cell->SetValue( value );
|
cell->SetValue( value );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user