wxPGProperty::AddChild() can now be used to add normal child properties (previously it was only used to add private children of derived property classes such as wxFontProperty and wxFlagsProperty). However, to allow backwards compatibility, SetParentalStyle(wxPG_PROP_MISC_PARENT) needs to be called before doing so. Also done: merged property initialization code from PrepareToAddItem() and PrepareSubProperties() to InitAfterAdded().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-10-14 17:15:59 +00:00
parent c8c86bd0ba
commit 2fd4a52415
11 changed files with 261 additions and 201 deletions

View File

@@ -1476,7 +1476,8 @@ void wxPropertyGrid::DoSetPropertyValueUnspecified( wxPGProperty* p )
DrawItemAndChildren(p);
wxPGProperty* parent = p->GetParent();
while ( (parent->GetFlags() & wxPG_PROP_PARENTAL_FLAGS) == wxPG_PROP_MISC_PARENT )
while ( parent &&
(parent->GetFlags() & wxPG_PROP_PARENTAL_FLAGS) == wxPG_PROP_MISC_PARENT )
{
DrawItem(parent);
parent = parent->GetParent();