From aa495f9389f483e891ce0ee7f7fddf9fcbe5bff8 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 14 May 2015 15:36:44 +0200 Subject: [PATCH] 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. --- src/propgrid/propgridpagestate.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 55d91115a3..277a071a0a 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -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;