]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/listbox.cpp
Save a reference to the async sound object
[wxWidgets.git] / src / mac / carbon / listbox.cpp
index 3ed2418065428a9f4db41cd31f2325e518fd85e6..ba5b33e446a2274ffdcd8d0d3bdf3578ba4aa74e 100644 (file)
@@ -439,6 +439,21 @@ 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,
         wxT("invalid index in wxListBox::SetSelection") );
     MacSetSelection( N , select ) ;