Commit f6916672 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Fix offset for group box



Task-number: QTCREATORBUG-12705
Change-Id: I3daee35ed5a5ce8688e54a50b3a8ca4f5c9d4c5b
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 8e9bb261
......@@ -128,9 +128,9 @@ void DragTool::createQmlItemNode(const ItemLibraryEntry &itemLibraryEntry,
MetaInfo metaInfo = MetaInfo::global();
FormEditorItem *parentItem = scene()->itemForQmlItemNode(parentNode);
QPointF pos = parentItem->mapFromScene(scenePosition);
QPointF positonInItemSpace = parentItem->qmlItemNode().instanceSceneContentItemTransform().inverted().map(scenePosition);
m_dragNode = QmlItemNode::createQmlItemNode(view(), itemLibraryEntry, pos, parentNode);
m_dragNode = QmlItemNode::createQmlItemNode(view(), itemLibraryEntry, positonInItemSpace, parentNode);
QList<QmlItemNode> nodeList;
nodeList.append(m_dragNode);
......@@ -145,7 +145,7 @@ void DragTool::createQmlItemNodeFromImage(const QString &imageName,
MetaInfo metaInfo = MetaInfo::global();
FormEditorItem *parentItem = scene()->itemForQmlItemNode(parentNode);
QPointF positonInItemSpace = parentItem->qmlItemNode().instanceSceneTransform().inverted().map(scenePosition);
QPointF positonInItemSpace = parentItem->qmlItemNode().instanceSceneContentItemTransform().inverted().map(scenePosition);
m_dragNode = QmlItemNode::createQmlItemNodeFromImage(view(), imageName, positonInItemSpace, parentNode);
......
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