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 <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2016-12-13 15:13:56 +01:00
parent 003a8985a2
commit 26d2f62f7e

View File

@@ -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());
}
}