]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use iterators with wxDataViewSelection.
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 9 Aug 2011 11:35:32 +0000 (11:35 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 9 Aug 2011 11:35:32 +0000 (11:35 +0000)
They aren't implemented when using wx's homegrown sorted containers
and adding support is probably more trouble than it's worth.

Fixes #13388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 4573c9bb78c51805d860de0fbebe266a7d176842..167c1149b87b33754791d32ef707e181f26ec5f0 100644 (file)
@@ -4429,11 +4429,10 @@ int wxDataViewCtrl::GetSelections( wxDataViewItemArray & sel ) const
     sel.Empty();
     wxDataViewSelection selection = m_clientArea->GetSelections();
 
     sel.Empty();
     wxDataViewSelection selection = m_clientArea->GetSelections();
 
-    for ( wxDataViewSelection::const_iterator i = selection.begin();
-          i != selection.end();
-          ++i )
+    const size_t len = selection.size();
+    for ( size_t i = 0; i < len; i++ )
     {
     {
-        wxDataViewItem item = m_clientArea->GetItemByRow(*i);
+        wxDataViewItem item = m_clientArea->GetItemByRow(selection[i]);
         if ( item.IsOk() )
         {
             sel.Add(item);
         if ( item.IsOk() )
         {
             sel.Add(item);