From d274b4a5cfd27427994a64d7fccc2a723ee21cfc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 29 Mar 2014 16:52:48 +0000 Subject: [PATCH] Fix use of expander in non left most position in wxDataViewCtrl. Correct the expander rectangle definition to work when the expander column left boundary is not 0, i.e. if the expander column is not the left most one. Closes #16131. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/generic/datavgen.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index d007a77cb2..50a33da7c8 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -650,6 +650,7 @@ wxMSW: - Disable the use of new style wxDirDialog under Vista to work around a bug in its implementation under this system (jtrauntvein). - Fix wxExecute() keeping open too many thread handles for too long (dannchr). +- Fix expander in non left-most position in wxDataViewCtrl (Laurent Poujoulat). wxOSX: diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 4064ee91a5..2f14e6d964 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4177,7 +4177,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) { // we make the rectangle we are looking in a bit bigger than the actual // visual expander so the user can hit that little thing reliably - wxRect rect(itemOffset, + wxRect rect(xpos + itemOffset, GetLineStart( current ) + (GetLineHeight(current) - m_lineHeight)/2, m_lineHeight, m_lineHeight);