From: Vadim Zeitlin Date: Sun, 13 Aug 2006 01:13:53 +0000 (+0000) Subject: fixed SetSelection(-1) for controls with multiple selection (patch 1537282) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ad6791377de800999ced90ec48d780c3e7152ec0 fixed SetSelection(-1) for controls with multiple selection (patch 1537282) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 0195b3e4c0..7cdf248b6a 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -264,7 +264,10 @@ void wxVListBox::SetSelection(int selection) if ( HasMultipleSelection() ) { - Select(selection); + if (selection != wxNOT_FOUND) + Select(selection); + else + DeselectAll(); m_anchor = selection; }