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,12 +2911,17 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *WXUNUSED(column),
|
||||
wxVariant value;
|
||||
wx_model->GetValue( value, item, cell->GetOwner()->GetModelColumn() );
|
||||
|
||||
if (value.GetType() != cell->GetVariantType())
|
||||
// It is always possible to leave a cell empty, don't warn about type
|
||||
// mismatch in this case.
|
||||
if (!value.IsNull())
|
||||
{
|
||||
wxLogDebug("Wrong type returned from the model: "
|
||||
"%s required but actual type is %s",
|
||||
cell->GetVariantType(),
|
||||
value.GetType());
|
||||
if (value.GetType() != cell->GetVariantType())
|
||||
{
|
||||
wxLogDebug("Wrong type returned from the model: "
|
||||
"%s required but actual type is %s",
|
||||
cell->GetVariantType(),
|
||||
value.GetType());
|
||||
}
|
||||
}
|
||||
|
||||
cell->SetValue( value );
|
||||
|
Reference in New Issue
Block a user