forked from qt-creator/qt-creator
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:
@@ -1234,10 +1234,9 @@ void NodeInstanceView::childrenChanged(const ChildrenChangedCommand &command)
|
|||||||
foreach (qint32 instanceId, command.childrenInstances()) {
|
foreach (qint32 instanceId, command.childrenInstances()) {
|
||||||
if (hasInstanceForId(instanceId)) {
|
if (hasInstanceForId(instanceId)) {
|
||||||
NodeInstance instance = instanceForId(instanceId);
|
NodeInstance instance = instanceForId(instanceId);
|
||||||
if (instance.parentId() == -1 || !instance.directUpdates()) {
|
if (instance.parentId() == -1 || !instance.directUpdates())
|
||||||
instance.setParentId(command.parentInstanceId());
|
instance.setParentId(command.parentInstanceId());
|
||||||
childNodeVector.append(instance.modelNode());
|
childNodeVector.append(instance.modelNode());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user