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
This commit is contained in:
Vadim Zeitlin 2014-09-23 17:40:33 +00:00
parent 6fb16229f5
commit 831045ff45

View File

@ -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 )
{