Speed up wxDataViewCtrl::SetSelections() on macOS
Don't make many single-item selection adjustments in SetSelections() in wxOSX and instead implement it with a single native call to selectRowIndexes:byExtendingSelection: This has a dramatic, orders of magnitude effect on this call's performance when selecting many items: selecting 10 thousand items goes from minutes of runtime and gigabytes of RAM to unobservable impact in both.
This commit is contained in:
@@ -90,6 +90,7 @@ public:
|
||||
virtual int GetSelections(wxDataViewItemArray& sel) const = 0; // returns all selected items in the native control
|
||||
virtual bool IsSelected (wxDataViewItem const& item) const = 0; // checks if the passed item is selected in the native control
|
||||
virtual void Select (wxDataViewItem const& item) = 0; // selects the passed item in the native control
|
||||
virtual void Select (wxDataViewItemArray const& items) = 0; // selects the passed items in the native control
|
||||
virtual void SelectAll() = 0; // selects all items in the native control
|
||||
virtual void Unselect (wxDataViewItem const& item) = 0; // unselects the passed item in the native control
|
||||
virtual void UnselectAll() = 0; // unselects all items in the native control
|
||||
|
Reference in New Issue
Block a user