]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/listbox.cpp
minor changes to eliminate unused parameter warning + some cleanup
[wxWidgets.git] / src / univ / listbox.cpp
index 9a519bcc22ddbbda5429e8edfb7eb4d5d28533c5..4612caa01df895d24394c0cef4bc83d017e0b61b 100644 (file)
@@ -49,8 +49,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
 
 BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase)
     EVT_SIZE(wxListBox::OnSize)
-
-    EVT_IDLE(wxListBox::OnIdle)
 END_EVENT_TABLE()
 
 // ----------------------------------------------------------------------------
@@ -274,7 +272,8 @@ void wxListBox::Clear()
 
 void wxListBox::Delete(int n)
 {
-    wxCHECK_RET( n < GetCount(), _T("invalid index in wxListBox::Delete") );
+    wxCHECK_RET( n >= 0 && n < GetCount(),
+                 _T("invalid index in wxListBox::Delete") );
 
     // do it before removing the index as otherwise the last item will not be
     // refreshed (as GetCount() will be decremented)
@@ -600,7 +599,7 @@ void wxListBox::UpdateItems()
     }
 }
 
-void wxListBox::OnIdle(wxIdleEvent& event)
+void wxListBox::OnInternalIdle()
 {
     if ( m_updateScrollbarY || m_updateScrollbarX )
     {
@@ -623,8 +622,6 @@ void wxListBox::OnIdle(wxIdleEvent& event)
 
         m_updateCount = 0;
     }
-
-    event.Skip();
 }
 
 // ----------------------------------------------------------------------------