From 430a72fad646e6df100c1fefb6b4b838a98bef3b Mon Sep 17 00:00:00 2001 From: oBFusCATed Date: Sun, 8 Nov 2015 21:53:14 +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 b178b1b46c..5172f4fbb9 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -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;