Stop using wxDataViewModel::GetColumnCount() in wxGTK code too

We must use wxDataViewCtrl::GetColumnCount() instead, as using the model
column count was just wrong if the control didn't use all of the model
columns.
This commit is contained in:
Vadim Zeitlin 2022-06-18 18:23:17 +02:00
parent 72171059b4
commit f6d9c13e11

View File

@ -752,7 +752,7 @@ wxgtk_tree_model_get_n_columns (GtkTreeModel *tree_model)
if ( wxtree_model->stamp == 0 ) if ( wxtree_model->stamp == 0 )
return 0; return 0;
return wxtree_model->internal->GetDataViewModel()->GetColumnCount(); return wxtree_model->internal->GetOwner()->GetColumnCount();
} }
static GType static GType