QmlDesigner: Fix crash

I found the crash when opening:
qtquickcontrols2\examples\quickcontrols2\contactlist\ContactForm.ui.qml.
The crash was triggered by the root item being a layout.

Change-Id: Id95aee6c76fbe1102578fb5a297b155645ebb157
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-04-04 12:02:39 +02:00
parent 60e3030082
commit 49e7f07526

View File

@@ -371,6 +371,9 @@ bool itemIsMovable(const ModelNode &modelNode)
if (modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab"))
return false;
if (!modelNode.hasParentProperty())
return false;
if (!modelNode.parentProperty().isNodeListProperty())
return false;