Use wxPGProperty::GetDepth() getter.
Use it instead of getting direct access to the corresponding member variable.
This commit is contained in:
@@ -565,7 +565,7 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState,
|
|||||||
unsigned char depth = 1;
|
unsigned char depth = 1;
|
||||||
if ( !parentIsRoot )
|
if ( !parentIsRoot )
|
||||||
{
|
{
|
||||||
depth = parent->m_depth;
|
depth = parent->GetDepth();
|
||||||
if ( !parent->IsCategory() )
|
if ( !parent->IsCategory() )
|
||||||
depth++;
|
depth++;
|
||||||
}
|
}
|
||||||
@@ -599,7 +599,7 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState,
|
|||||||
unsigned char depth = 1;
|
unsigned char depth = 1;
|
||||||
if ( !parentIsRoot )
|
if ( !parentIsRoot )
|
||||||
{
|
{
|
||||||
depth = parent->m_depth + 1;
|
depth = parent->GetDepth() + 1;
|
||||||
}
|
}
|
||||||
m_depth = depth;
|
m_depth = depth;
|
||||||
m_depthBgCol = depth;
|
m_depthBgCol = depth;
|
||||||
|
@@ -610,9 +610,9 @@ bool wxPropertyGridPageState::EnableCategories( bool enable )
|
|||||||
// then the depth stays the same.
|
// then the depth stays the same.
|
||||||
if ( parent->IsCategory() &&
|
if ( parent->IsCategory() &&
|
||||||
!p->IsCategory() )
|
!p->IsCategory() )
|
||||||
p->m_depth = parent->m_depth;
|
p->m_depth = parent->GetDepth();
|
||||||
else
|
else
|
||||||
p->m_depth = parent->m_depth + 1;
|
p->m_depth = parent->GetDepth() + 1;
|
||||||
|
|
||||||
ITEM_ITERATION_LOOP_END
|
ITEM_ITERATION_LOOP_END
|
||||||
|
|
||||||
@@ -641,7 +641,7 @@ bool wxPropertyGridPageState::EnableCategories( bool enable )
|
|||||||
|
|
||||||
p->m_parent = parent;
|
p->m_parent = parent;
|
||||||
|
|
||||||
p->m_depth = parent->m_depth + 1;
|
p->m_depth = parent->GetDepth() + 1;
|
||||||
|
|
||||||
ITEM_ITERATION_LOOP_END
|
ITEM_ITERATION_LOOP_END
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user