]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed SetSelection(-1) for controls with multiple selection (patch 1537282)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 13 Aug 2006 01:13:53 +0000 (01:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 13 Aug 2006 01:13:53 +0000 (01:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/vlbox.cpp

index 0195b3e4c073509dee66e0bf027aef12609233e2..7cdf248b6a21ef596425b6fdfb9d31156b87271d 100644 (file)
@@ -264,7 +264,10 @@ void wxVListBox::SetSelection(int selection)
 
     if ( HasMultipleSelection() )
     {
-        Select(selection);
+        if (selection != wxNOT_FOUND)
+            Select(selection);
+        else
+            DeselectAll();
         m_anchor = selection;
     }