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:
@@ -257,6 +257,7 @@ public:
|
||||
virtual bool HasDefaultCompare() const { return false; }
|
||||
|
||||
// internal
|
||||
virtual bool IsListModel() const { return false; }
|
||||
virtual bool IsVirtualListModel() const { return false; }
|
||||
|
||||
protected:
|
||||
@@ -328,6 +329,8 @@ public:
|
||||
{
|
||||
return GetAttrByRow( GetRow(item), col, attr );
|
||||
}
|
||||
|
||||
virtual bool IsListModel() const { return true; }
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user