Add GetExpanderColumnOrFirstOne() to avoid code duplication in generic wxDVC.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Sep 2011 18:37:11 +0000 (18:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Sep 2011 18:37:11 +0000 (18:37 +0000)
commit1841f0790dccd08f7eb40f49d93ab429498ec78b
treea58c64c28dde73cedbd9b89d593acf57a097e0e3
parent42cbde516210997d113e3671dc0bfffb01ac6a1d
Add GetExpanderColumnOrFirstOne() to avoid code duplication in generic wxDVC.

There were two strictly identical code snippets setting the expander column to
be the first one if it hadn't been set before, replace both of them with a
call to GetExpanderColumnOrFirstOne() function.

Also use this function instead of just GetExpanderColumn() (which might return
NULL) in a couple of places.

Notice that there are still a lot of places in the code where the column 0 is
hard coded as being the expander column, this would need to be fixed to really
support non-first expander column.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/datavgen.cpp