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:
parent
b7c4b51b41
commit
aa495f9389
@ -1848,8 +1848,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 = true;
|
||||
|
||||
return property;
|
||||
|
Loading…
Reference in New Issue
Block a user