Don't lose selection in wxDataViewCtrl::Select() under Mac.

Calling Select() for an item should not deselect the other selected items in
multiple selection mode. This is consistent with the GTK and generic versions
behaviour and also just makes more sense but also document that this is indeed
the desired behaviour just in case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-08-09 21:17:51 +00:00
parent 6c78066f22
commit 1e18430004
2 changed files with 5 additions and 1 deletions

View File

@@ -963,6 +963,10 @@ public:
/**
Select the given item.
In single selection mode this changes the (unique) currently selected
item. In multi selection mode, the @a item is selected and the
previously selected items remain selected.
*/
virtual void Select(const wxDataViewItem& item);

View File

@@ -2096,7 +2096,7 @@ void wxCocoaDataViewControl::Select(const wxDataViewItem& item)
{
if (item.IsOk())
[m_OutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[m_OutlineView rowForItem:[m_DataSource getDataViewItemFromBuffer:item]]]
byExtendingSelection:NO];
byExtendingSelection:GetDataViewCtrl()->HasFlag(wxDV_MULTIPLE) ? YES : NO];
}
void wxCocoaDataViewControl::SelectAll()