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:
@@ -1848,8 +1848,17 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
|
|||||||
|
|
||||||
VirtualHeightChanged();
|
VirtualHeightChanged();
|
||||||
|
|
||||||
|
// Update values of all parents if they are containers of composed values.
|
||||||
property->UpdateParentValues();
|
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 = true;
|
m_itemsAdded = true;
|
||||||
|
|
||||||
return property;
|
return property;
|
||||||
|
Reference in New Issue
Block a user