X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3ad4d4a455aed28178d8a22c305e1a4d6b23f23..fa93d732e2afd376527d9c0eb726057f15f18868:/src/generic/datavgen.cpp diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index af9e477cb7..582137ff02 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -518,7 +518,6 @@ public: unsigned int GetLastVisibleRow(); unsigned int GetRowCount(); - wxDataViewItem GetSelection() const; const wxDataViewSelection& GetSelections() const { return m_selection; } void SetSelections( const wxDataViewSelection & sel ) { m_selection = sel; UpdateDisplay(); } @@ -3962,14 +3961,6 @@ void wxDataViewMainWindow::OnKillFocus( wxFocusEvent &event ) event.Skip(); } -wxDataViewItem wxDataViewMainWindow::GetSelection() const -{ - if( m_selection.GetCount() != 1 ) - return wxDataViewItem(); - - return GetItemByRow( m_selection.Item(0)); -} - //----------------------------------------------------------------------------- // wxDataViewCtrl //----------------------------------------------------------------------------- @@ -4486,10 +4477,9 @@ void wxDataViewCtrl::DoSetCurrentItem(const wxDataViewItem& item) } } -// Selection code with wxDataViewItem as parameters -wxDataViewItem wxDataViewCtrl::GetSelection() const +int wxDataViewCtrl::GetSelectedItemsCount() const { - return m_clientArea->GetSelection(); + return m_clientArea->GetSelections().size(); } int wxDataViewCtrl::GetSelections( wxDataViewItemArray & sel ) const