QmlDesigner: do no refresh if there is no parent

Change-Id: I2299437ea97e884f4b7734129eec8246c87208ab
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-01-21 12:29:00 +01:00
parent 626ca46844
commit bc08c10764

View File

@@ -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)