Commit 3298df45 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.formEditor: fixes rootFormEditorItem()

Previous implementation was broken.
parent 1726cec6
......@@ -368,10 +368,8 @@ void FormEditorScene::reparentItem(const QmlItemNode &node, const QmlItemNode &n
FormEditorItem* FormEditorScene::rootFormEditorItem() const
{
QList<QGraphicsItem*> childItemList(m_formLayerItem->childItems());
if (!childItemList.isEmpty())
return FormEditorItem::fromQGraphicsItem(childItemList.first());
if (hasItemForQmlItemNode(editorView()->rootModelNode()))
return itemForQmlItemNode(editorView()->rootModelNode());
return 0;
}
......
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