From 831045ff45b42e0f26dedf13fac59bfa1f0a9708 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:40:33 +0000 Subject: [PATCH] if call SetSelection by wxNOT_FOUND in listbox of wxUniv, just deselect all git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/listbox.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index a448b9cbb9..0255933781 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -420,12 +420,10 @@ void wxListBox::DoSetSelection(int n, bool select) { if ( n == wxNOT_FOUND ) { - if ( !HasMultipleSelection() ) - { - // selecting wxNOT_FOUND is documented to deselect all items - DeselectAll(); - return; - } + // if is wxNOT_FOUND, just deselect all like other posts + // selecting wxNOT_FOUND is documented to deselect all items + DeselectAll(); + return; } else if ( m_selections.Index(n) == wxNOT_FOUND ) {