]> git.saurik.com Git - wxWidgets.git/commitdiff
Faster Deselect
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 5 Nov 2004 19:07:22 +0000 (19:07 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 5 Nov 2004 19:07:22 +0000 (19:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/listbox.cpp

index 377a91d3f6361093bc7ccff130eb9988b725f8a2..ebb9ee5ff91b7fc4de0a61819436327fc21523c4 100644 (file)
@@ -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 )