Commit f0cac988 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.model: add resetView() to AbstractView

Change-Id: I36b14447f901ae97d24a92ce4ba0510e36177611
Reviewed-on: http://codereview.qt.nokia.com/722Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent b7cbc967
......@@ -172,6 +172,8 @@ public:
NodeInstanceView *nodeInstanceView() const;
RewriterView *rewriterView() const;
void resetView();
protected:
void setModel(Model * model);
void removeModel();
......
......@@ -357,6 +357,16 @@ RewriterView *AbstractView::rewriterView() const
}
}
void AbstractView::resetView()
{
if (!model())
return;
Model *currentModel = model();
currentModel->detachView(this);
currentModel->attachView(this);
}
QList<ModelNode> AbstractView::allModelNodes()
{
return toModelNodeList(model()->m_d->allNodes());
......
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