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:
@@ -236,7 +236,6 @@ public:
|
||||
|
||||
virtual bool SetRowHeight( int rowHeight ) wxOVERRIDE;
|
||||
|
||||
virtual void Expand( const wxDataViewItem & item ) wxOVERRIDE;
|
||||
virtual void Collapse( const wxDataViewItem & item ) wxOVERRIDE;
|
||||
virtual bool IsExpanded( const wxDataViewItem & item ) const wxOVERRIDE;
|
||||
|
||||
@@ -318,6 +317,8 @@ private:
|
||||
virtual wxDataViewItem DoGetCurrentItem() const wxOVERRIDE;
|
||||
virtual void DoSetCurrentItem(const wxDataViewItem& item) wxOVERRIDE;
|
||||
|
||||
virtual void DoExpand(const wxDataViewItem& item) wxOVERRIDE;
|
||||
|
||||
void InvalidateColBestWidths();
|
||||
void InvalidateColBestWidth(int idx);
|
||||
void UpdateColWidths();
|
||||
|
Reference in New Issue
Block a user