From be7e10393ae37a8b6395c50ac258c2c77c98c946 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Sun, 14 Mar 2010 17:15:17 +0000 Subject: [PATCH] Fixed label editor position for child properties git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 7e38cfb439..6f244d0bfb 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3580,14 +3580,21 @@ wxRect wxPropertyGrid::GetEditorWidgetRect( wxPGProperty* p, int column ) const GetViewStart(&vx, &vy); vy *= wxPG_PIXELS_PER_UNIT; - // TODO: If custom image detection changes from current, change this. - if ( m_iFlags & wxPG_FL_CUR_USES_CUSTOM_IMAGE ) - { - //m_iFlags |= wxPG_FL_CUR_USES_CUSTOM_IMAGE; - int iw = p->OnMeasureImage().x; - if ( iw < 1 ) - iw = wxPG_CUSTOM_IMAGE_WIDTH; - imageOffset = p->GetImageOffset(iw); + if ( column == 1 ) + { + // TODO: If custom image detection changes from current, change this. + if ( m_iFlags & wxPG_FL_CUR_USES_CUSTOM_IMAGE ) + { + //m_iFlags |= wxPG_FL_CUR_USES_CUSTOM_IMAGE; + int iw = p->OnMeasureImage().x; + if ( iw < 1 ) + iw = wxPG_CUSTOM_IMAGE_WIDTH; + imageOffset = p->GetImageOffset(iw); + } + } + else if ( column == 0 ) + { + splitterX += (p->m_depth - 1) * m_subgroup_extramargin; } return wxRect -- 2.45.2