X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad6791377de800999ced90ec48d780c3e7152ec0..f1d6804f7c1a398dd0616ccf15cb0f96ea07f5e0:/src/generic/vlbox.cpp diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 7cdf248b6a..2a3ca54d1c 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -64,7 +64,6 @@ void wxVListBox::Init() m_current = m_anchor = wxNOT_FOUND; m_selStore = NULL; - m_doubleBuffer = NULL; } bool wxVListBox::Create(wxWindow *parent, @@ -94,7 +93,6 @@ bool wxVListBox::Create(wxWindow *parent, wxVListBox::~wxVListBox() { - delete m_doubleBuffer; delete m_selStore; } @@ -360,18 +358,9 @@ void wxVListBox::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const void wxVListBox::OnPaint(wxPaintEvent& WXUNUSED(event)) { - // If size is larger, recalculate double buffer bitmap wxSize clientSize = GetClientSize(); - if ( !m_doubleBuffer || - clientSize.x > m_doubleBuffer->GetWidth() || - clientSize.y > m_doubleBuffer->GetHeight() ) - { - delete m_doubleBuffer; - m_doubleBuffer = new wxBitmap(clientSize.x+25,clientSize.y+25); - } - - wxBufferedPaintDC dc(this,*m_doubleBuffer); + wxAutoBufferedPaintDC dc(this); // the update rectangle wxRect rectUpdate = GetUpdateClientRect();