From: Vadim Zeitlin Date: Thu, 21 Jul 2011 13:50:14 +0000 (+0000) Subject: Fix drawing of expander columns not at 0 position in generic wxDVC. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/311c4a7a852c719f234a3822acc4b5d526c2711f 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 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 84834e7beb..c5b8d9d37d 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -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