QmlDesigner: Fix crash in qml2puppet

We should not call updateDirtyNode() for items without a window.
This will assert later in consistency checks.

Change-Id: Iff3574123a1497206de88d59fcf630ead57ef593
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2016-01-19 12:04:06 +01:00
parent 9c77515b21
commit 17e5cd7085

View File

@@ -581,7 +581,8 @@ void QuickItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParen
} }
refresh(); refresh();
DesignerSupport::updateDirtyNode(quickItem()); if (quickItem()->window())
DesignerSupport::updateDirtyNode(quickItem());
if (instanceIsValidLayoutable(oldParentInstance, oldParentProperty)) if (instanceIsValidLayoutable(oldParentInstance, oldParentProperty))
oldParentInstance->refreshLayoutable(); oldParentInstance->refreshLayoutable();