diff options
Diffstat (limited to 'src/plugins/qmldesigner/qmldesignerplugin.cpp')
-rw-r--r-- | src/plugins/qmldesigner/qmldesignerplugin.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp index a770507599..8a08aaf055 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.cpp +++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp @@ -225,7 +225,7 @@ void QmlDesignerPlugin::showDesigner() void QmlDesignerPlugin::hideDesigner() { if (currentDesignDocument() - && currentDesignDocument()->currentModel() + && currentModel() && !currentDesignDocument()->hasQmlSyntaxErrors()) jumpTextCursorToSelectedModelNode(); @@ -343,7 +343,7 @@ void QmlDesignerPlugin::deactivateAutoSynchronization() void QmlDesignerPlugin::resetModelSelection() { - if (rewriterView() && currentDesignDocument()->currentModel()) + if (rewriterView() && currentModel()) rewriterView()->setSelectedModelNodes(QList<ModelNode>()); } @@ -352,6 +352,11 @@ RewriterView *QmlDesignerPlugin::rewriterView() const return currentDesignDocument()->rewriterView(); } +Model *QmlDesignerPlugin::currentModel() const +{ + return currentDesignDocument()->currentModel(); +} + static bool checkIfEditorIsQtQuick(Core::IEditor *editor) { if (editor) |