QmlDesigner: reduce editor changed signals

- detaching the TextEditView already emits the TextEditor change signal
   -> so removing the call from QmlDesignerPlugin::deactivateAutoSynchronization()
 - in case the user closed explicit the editor we do not want to emit any
   signals anymore

Change-Id: Idb5c2cdde583f7d32f2a9ef5628d1b6d3fc7bb3f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Tim Jenssen
2017-10-17 17:43:53 +02:00
committed by Thomas Hartmann
parent b25d21f42e
commit 668c87ffd9
3 changed files with 13 additions and 2 deletions

View File

@@ -118,7 +118,11 @@ void TextEditorView::modelAboutToBeDetached(Model *model)
m_widget->setTextEditor(0);
QmlDesignerPlugin::instance()->emitCurrentTextEditorChanged(QmlDesignerPlugin::instance()->currentDesignDocument()->textEditor());
// in case the user closed it explicit we do not want to do anything with the editor
if (TextEditor::BaseTextEditor *textEditor =
QmlDesignerPlugin::instance()->currentDesignDocument()->textEditor()) {
QmlDesignerPlugin::instance()->emitCurrentTextEditorChanged(textEditor);
}
}
void TextEditorView::importsChanged(const QList<Import> &/*addedImports*/, const QList<Import> &/*removedImports*/)