Commit 2d177eb7 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Add changeToCustomTool method

Change-Id: I236c2e1422ef9a984d34b752e70e1dc8bcdee6a7
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 74d9d858
......@@ -436,6 +436,15 @@ void FormEditorView::changeToCustomTool(const ModelNode &modelNode)
}
}
void FormEditorView::changeToCustomTool(AbstractCustomTool *customTool)
{
m_scene->updateAllFormEditorItems();
m_currentTool->clear();
m_currentTool = customTool;
m_currentTool->clear();
m_currentTool->setItems(scene()->itemsForQmlItemNodes(selectedQmlItemNodes()));
}
void FormEditorView::registerTool(AbstractCustomTool *tool)
{
tool->setView(this);
......
......@@ -100,6 +100,7 @@ public:
void changeToResizeTool();
void changeToTransformTools();
void changeToCustomTool(const ModelNode &modelNode);
void changeToCustomTool(AbstractCustomTool *customTool);
void registerTool(AbstractCustomTool *tool);
......
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