Commit 055a34ba authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann
Browse files

QmlDesigner.FormEditor: Add set view function to tool



Change-Id: Ie9ba58aec446dabc22cbecf99b791cfefd4e3412
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
(cherry picked from commit e114c911

)
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent b8d8c9c6
......@@ -56,6 +56,11 @@ FormEditorView* AbstractFormEditorTool::view() const
return m_view;
}
void AbstractFormEditorTool::setView(FormEditorView *view)
{
m_view = view;
}
FormEditorScene* AbstractFormEditorTool::scene() const
{
return view()->scene();
......
......@@ -44,7 +44,7 @@ class FormEditorView;
class QMLDESIGNERCORE_EXPORT AbstractFormEditorTool
{
friend class FormEditorView;
public:
AbstractFormEditorTool(FormEditorView* view);
......@@ -100,6 +100,7 @@ protected:
virtual void showContextMenu(QGraphicsSceneMouseEvent *event);
FormEditorView *view() const;
void setView(FormEditorView *view);
FormEditorScene* scene() const;
private:
FormEditorView *m_view;
......
......@@ -438,6 +438,7 @@ void FormEditorView::changeToCustomTool(const ModelNode &modelNode)
void FormEditorView::registerTool(AbstractCustomTool *tool)
{
tool->setView(this);
m_customToolList.append(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