Fix wxDataViewCtrl to omit expander space for all kinds of lists.
List-only models don't have expanders and so the control shouldn't reserve any space for them; the notion of expander column doesn't make sense here. Previously, this was done correctly only for wxDataViewVirtualListModel; "ordinary" list models, such as the one used by wxDataViewListCtrl, were treated as generic tree models and 0th column had ugly empty space reserved for (never used) expander. This patch fixes it by adding IsListModel() helper function in addition to existing IsVirtualListModel(). Some of the IsVirtualListModel() tests were changed into IsListModel() checks as appropriate. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3502,10 +3502,15 @@ bool wxDataViewCtrlInternal::ValueChanged( const wxDataViewItem &item, unsigned
|
||||
|
||||
GtkTreeModelFlags wxDataViewCtrlInternal::get_flags()
|
||||
{
|
||||
if (m_wx_model->IsVirtualListModel())
|
||||
return GTK_TREE_MODEL_LIST_ONLY;
|
||||
else
|
||||
return GTK_TREE_MODEL_ITERS_PERSIST;
|
||||
int flags = 0;
|
||||
|
||||
if ( m_wx_model->IsListModel() )
|
||||
flags |= GTK_TREE_MODEL_LIST_ONLY;
|
||||
|
||||
if ( !m_wx_model->IsVirtualListModel() )
|
||||
flags |= GTK_TREE_MODEL_ITERS_PERSIST;
|
||||
|
||||
return GtkTreeModelFlags(flags);
|
||||
}
|
||||
|
||||
gboolean wxDataViewCtrlInternal::get_iter( GtkTreeIter *iter, GtkTreePath *path )
|
||||
|
Reference in New Issue
Block a user