From 9a5d02f2c3875ef486395a1b22160a39515c1624 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 29 Mar 2014 16:53:51 +0000 Subject: [PATCH] Another PrepareForItem()-related fix in generic wxDataViewCtrl. This fix is similar to the previous commit but more speculative, as we currently don't have a bug scenario for it. Still, it seems to be wrong to call PrepareForItem() just before GetLineStart() which undoes its effect, so exchange the order of the calls. See #16132. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index add0d06098..a03b3e8595 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2114,12 +2114,12 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) dataitem = wxDataViewItem( wxUIntToPtr(item+1) ); } - cell->PrepareForItem(model, dataitem, col->GetModelColumn()); - // update cell_rect cell_rect.y = GetLineStart( item ); cell_rect.height = GetLineHeight( item ); + cell->PrepareForItem(model, dataitem, col->GetModelColumn()); + // draw the background bool selected = m_selection.Index( item ) != wxNOT_FOUND; if ( !selected )