From: Stefan Csomor Date: Fri, 5 Nov 2004 19:07:22 +0000 (+0000) Subject: Faster Deselect X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/13220cca727ed74c2998b4fb89a4d80aacf28e68 Faster Deselect git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 377a91d3f6..ebb9ee5ff9 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -440,22 +440,7 @@ void wxListBox::Clear() void wxListBox::SetSelection(int N, bool select) { - if ( N == wxNOT_FOUND ) - { - // unselect everything - int sel = MacGetSelection() ; - if ( sel != wxNOT_FOUND ) - { - UInt32 id = sel + 1 ; - verify_noerr( - m_peer->SetSelectedItems( 1 , & id , kDataBrowserItemsRemove ) - ); - } - - return; - } - - wxCHECK_RET( N >= 0 && N < m_noItems, + wxCHECK_RET( N == wxNOT_FOUND || (N >= 0 && N < m_noItems) , wxT("invalid index in wxListBox::SetSelection") ); if ( N == wxNOT_FOUND )