diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 4d3adb326e..fc71763684 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -565,7 +565,7 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, unsigned char depth = 1; if ( !parentIsRoot ) { - depth = parent->m_depth; + depth = parent->GetDepth(); if ( !parent->IsCategory() ) depth++; } @@ -599,7 +599,7 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState, unsigned char depth = 1; if ( !parentIsRoot ) { - depth = parent->m_depth + 1; + depth = parent->GetDepth() + 1; } m_depth = depth; m_depthBgCol = depth; diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 4e5f01400f..4693fd358c 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -610,9 +610,9 @@ bool wxPropertyGridPageState::EnableCategories( bool enable ) // then the depth stays the same. if ( parent->IsCategory() && !p->IsCategory() ) - p->m_depth = parent->m_depth; + p->m_depth = parent->GetDepth(); else - p->m_depth = parent->m_depth + 1; + p->m_depth = parent->GetDepth() + 1; ITEM_ITERATION_LOOP_END @@ -641,7 +641,7 @@ bool wxPropertyGridPageState::EnableCategories( bool enable ) p->m_parent = parent; - p->m_depth = parent->m_depth + 1; + p->m_depth = parent->GetDepth() + 1; ITEM_ITERATION_LOOP_END }