Fix inserting child properties into the parent composed property (in wxPropertyGridPageState::DoInsert).

When new sub-property is added and the parent property is a container of composed values then its editor (if exists) need to be refreshed to reflect the new composed value.

Closes #16982.
This commit is contained in:
oBFusCATed
2015-11-08 21:53:14 +02:00
committed by Vadim Zeitlin
parent a4f2f2ec6c
commit 430a72fad6

View File

@@ -1808,8 +1808,17 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
VirtualHeightChanged();
// Update values of all parents if they are containers of composed values.
property->UpdateParentValues();
// Update editor controls of all parents if they are containers of composed values.
for( wxPGProperty *p = property->GetParent();
p && !p->IsRoot() && !p->IsCategory() && p->HasFlag(wxPG_PROP_COMPOSED_VALUE);
p = p->GetParent() )
{
p->RefreshEditor();
}
m_itemsAdded = 1;
return property;