X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a673eb1c9942cbdda6486bda330aeef0d43321a..8037b674e8b39d4ed3b621500237b5eb525a6de8:/src/generic/vlbox.cpp?ds=sidebyside 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; }