Fix drawing of expander columns not at 0 position in generic wxDVC.

The drawing code in the generic version of wxDataViewCtrl incorrectly supposed
that the expander column was always at position 0. This resulted in the
expander column not being drawn at all if it was not really the first one.

Fix the test to use wxDataViewCtrl::GetExpanderColumn() to correct this.

Closes #12870.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-21 13:50:14 +00:00
parent 4385e70296
commit 311c4a7a85

View File

@@ -1771,8 +1771,11 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
dataitem = node->GetItem();
if ((i > 0) && model->IsContainer(dataitem) &&
!model->HasContainerColumns(dataitem))
// Skip all columns of "container" rows except the expander
// column itself unless HasContainerColumns() overrides this.
if ( col != GetOwner()->GetExpanderColumn() &&
model->IsContainer(dataitem) &&
!model->HasContainerColumns(dataitem) )
continue;
}
else