]> git.saurik.com Git - wxWidgets.git/commitdiff
It's valid to pass wxNOT_FOUND to SetSelection in order to clear selections.
authorJulian Smart <julian@anthemion.co.uk>
Sun, 8 Oct 2006 15:54:40 +0000 (15:54 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 8 Oct 2006 15:54:40 +0000 (15:54 +0000)
Avoid assert and erroneous setting of -1.

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

src/gtk/listbox.cpp

index c8d292fb4ddc519e9e9e5429624879f999a9ebd1..ad3193f273827e335f3c146dc64f5173f6a1a83e 100644 (file)
@@ -942,6 +942,7 @@ void wxListBox::DoSetSelection( int n, bool select )
     {
         // ... and not generate any events in the process
         GtkDeselectAll();
+       return;
     }
 
     wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") );