From ad6791377de800999ced90ec48d780c3e7152ec0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 Aug 2006 01:13:53 +0000 Subject: [PATCH] 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 --- src/generic/vlbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.45.2