X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d00b880a793b5041add99065021f75d4fb788f50..31478355f8348d7dfb1c647919b62b224acfa8a0:/src/univ/listbox.cpp diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index 9a519bcc22..299255d2b8 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -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() // ---------------------------------------------------------------------------- @@ -108,7 +106,7 @@ bool wxListBox::Create(wxWindow *parent, #endif if ( !wxControl::Create(parent, id, pos, size, style, - wxDefaultValidator, name) ) + validator, name) ) return FALSE; SetWindow(this); @@ -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(); } // ---------------------------------------------------------------------------- @@ -772,7 +769,7 @@ void wxListBox::DoSetSize(int x, int y, height = ((height - hBorders + hLine - 1) / hLine)*hLine + hBorders; } - wxListBoxBase::DoSetSize(x, y, width, height); + wxListBoxBase::DoSetSize(x, y, width, height, sizeFlags); } wxSize wxListBox::DoGetBestClientSize() const