Reworked the way child properties can be added to a property that has not yet been added to a grid or page; AddChild() deprecated, now use AddPrivateChild() instead. For public children, new member functions AppendChild() and InsertChild() should do the job.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-03-12 18:17:55 +00:00
parent 69cf69be93
commit 48a32cf671
8 changed files with 193 additions and 107 deletions

View File

@@ -255,7 +255,7 @@ void wxPropertyGridPageState::InitNonCatMode()
wxPGProperty* parent = p->GetParent();
if ( parent->IsCategory() || parent->IsRoot() )
{
m_abcArray->AddChild2(p);
m_abcArray->DoAddChild(p);
p->m_parent = &m_regularArray;
}
}
@@ -1655,11 +1655,11 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
if ( m_abcArray && !property->IsCategory() &&
(parentIsCategory || parentIsRoot) )
{
m_abcArray->AddChild2( property, -1, false );
m_abcArray->DoAddChild( property, -1, false );
}
// Add to current mode.
parent->AddChild2( property, index, true );
parent->DoAddChild( property, index, true );
}
else
{
@@ -1667,14 +1667,14 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
if ( parentIsCategory )
// Parent is category.
parent->AddChild2( property, index, false );
parent->DoAddChild( property, index, false );
else if ( parentIsRoot )
// Parent is root.
m_regularArray.AddChild2( property, -1, false );
m_regularArray.DoAddChild( property, -1, false );
// Add to current mode
if ( !property->IsCategory() )
m_abcArray->AddChild2( property, index, true );
m_abcArray->DoAddChild( property, index, true );
}
// category stuff