From 26d2f62f7eea104b2bc805eced2f12ec27f61a01 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 13 Dec 2016 15:13:56 +0100 Subject: [PATCH] QmlDesigner: Fixing z-order issue Even if directUpdates() is true we have to append the node to the vector and notify, that the chidlren might have changed. Otherwise the z-order in the form editor might be updated incorrectly. Change-Id: I0697044200c5bb503f8e8d265796a14756305991 Reviewed-by: Tim Jenssen --- .../qmldesigner/designercore/instances/nodeinstanceview.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index bfb7e8a3b39..76408f59e32 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -1234,10 +1234,9 @@ void NodeInstanceView::childrenChanged(const ChildrenChangedCommand &command) foreach (qint32 instanceId, command.childrenInstances()) { if (hasInstanceForId(instanceId)) { NodeInstance instance = instanceForId(instanceId); - if (instance.parentId() == -1 || !instance.directUpdates()) { + if (instance.parentId() == -1 || !instance.directUpdates()) instance.setParentId(command.parentInstanceId()); - childNodeVector.append(instance.modelNode()); - } + childNodeVector.append(instance.modelNode()); } }