Make wxDataViewCtrl::Expand() expand ancestors in native ports too
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation but not in the native ones, resulting in observable difference in the behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared initially expanded under MSW, using the generic version, but collapsed under GTK and OSX. Harmonize this among all ports. This also has a nice side effect of making Expand() less horribly inefficient as it is not recursively called by ExpandAncestors() which it itself used to call: now ExpandAncestors() only calls DoExpand() which is a simple function that only expands the item passed to it and does nothing else. Closes #14803.
This commit is contained in:
@@ -447,7 +447,6 @@ public:
|
||||
virtual void Collapse(const wxDataViewItem& item);
|
||||
virtual void EnsureVisible(const wxDataViewItem& item,
|
||||
wxDataViewColumn const* columnPtr);
|
||||
virtual void Expand(const wxDataViewItem& item);
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxRect GetRectangle(const wxDataViewItem& item,
|
||||
wxDataViewColumn const* columnPtr);
|
||||
@@ -490,6 +489,9 @@ public:
|
||||
// other methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual void DoSetIndent(int indent);
|
||||
|
||||
virtual void DoExpand(const wxDataViewItem& item);
|
||||
|
||||
virtual void HitTest(const wxPoint& point,
|
||||
wxDataViewItem& item,
|
||||
wxDataViewColumn*& columnPtr) const;
|
||||
|
Reference in New Issue
Block a user