From 01cf62684c0d277721296cf371d7a7bffa74ba44 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 27 May 2015 21:15:28 +0200 Subject: [PATCH] Use wxPGProperty::GetDepth() getter. Use it instead of getting direct access to the corresponding member variable. --- src/propgrid/property.cpp | 4 ++-- src/propgrid/propgridpagestate.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 }