Commit bc08c107 authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: do no refresh if there is no parent

Change-Id: I2299437ea97e884f4b7734129eec8246c87208ab
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 626ca468
......@@ -580,15 +580,17 @@ void QuickItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParen
setPropertyVariant("y", y());
}
refresh();
if (quickItem()->window())
DesignerSupport::updateDirtyNode(quickItem());
if (quickItem()->parentItem()) {
refresh();
if (quickItem()->window())
DesignerSupport::updateDirtyNode(quickItem());
if (instanceIsValidLayoutable(oldParentInstance, oldParentProperty))
oldParentInstance->refreshLayoutable();
if (instanceIsValidLayoutable(oldParentInstance, oldParentProperty))
oldParentInstance->refreshLayoutable();
if (instanceIsValidLayoutable(newParentInstance, newParentProperty))
newParentInstance->refreshLayoutable();
if (instanceIsValidLayoutable(newParentInstance, newParentProperty))
newParentInstance->refreshLayoutable();
}
}
void QuickItemNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment