From 71aa152af2c737b0849262767d0236b3a01ab0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Thu, 6 Oct 2016 17:31:11 +0200 Subject: [PATCH] OS X: Reset selection in wxDataViewCtrl::SetSelections SetSelections() should reset selection to the specified items (consistently with other platforms), not add these items to the existing selection. --- src/osx/dataview_osx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index 2cdbc36020..54d1ad5053 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -589,6 +589,10 @@ void wxDataViewCtrl::SelectAll() void wxDataViewCtrl::SetSelections(wxDataViewItemArray const& sel) { + wxDataViewWidgetImpl* dataViewWidgetPtr(GetDataViewPeer()); + + dataViewWidgetPtr->UnselectAll(); + size_t const noOfSelections = sel.GetCount(); size_t i; @@ -608,8 +612,6 @@ void wxDataViewCtrl::SetSelections(wxDataViewItemArray const& sel) } // finally select the items: - wxDataViewWidgetImpl* dataViewWidgetPtr(GetDataViewPeer()); // variable definition for abbreviational purposes - for (i=0; iSelect(sel[i]); }