]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed label editor position for child properties
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 14 Mar 2010 17:15:17 +0000 (17:15 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 14 Mar 2010 17:15:17 +0000 (17:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgrid.cpp

index 7e38cfb439ae605ab610ae78cd24596ab7ef2013..6f244d0bfb9e05753cc4f4022eb6854e25d6637c 100644 (file)
@@ -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