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
This commit is contained in:
@@ -2114,12 +2114,12 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
dataitem = wxDataViewItem( wxUIntToPtr(item+1) );
|
dataitem = wxDataViewItem( wxUIntToPtr(item+1) );
|
||||||
}
|
}
|
||||||
|
|
||||||
cell->PrepareForItem(model, dataitem, col->GetModelColumn());
|
|
||||||
|
|
||||||
// update cell_rect
|
// update cell_rect
|
||||||
cell_rect.y = GetLineStart( item );
|
cell_rect.y = GetLineStart( item );
|
||||||
cell_rect.height = GetLineHeight( item );
|
cell_rect.height = GetLineHeight( item );
|
||||||
|
|
||||||
|
cell->PrepareForItem(model, dataitem, col->GetModelColumn());
|
||||||
|
|
||||||
// draw the background
|
// draw the background
|
||||||
bool selected = m_selection.Index( item ) != wxNOT_FOUND;
|
bool selected = m_selection.Index( item ) != wxNOT_FOUND;
|
||||||
if ( !selected )
|
if ( !selected )
|
||||||
|
Reference in New Issue
Block a user