forked from qt-creator/qt-creator
Core: Signal duplicated editors
FakeVim needs some notification even in cases where the duplication is triggered outside the EditorManager as in QmlDesigner's qml-editor. Fixes: QTCREATORBUG-22344 Change-Id: Ia4950ff4b02d3f89779f03ff4c106a07ccff2106 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1551,6 +1551,14 @@ void FakeVimPluginPrivate::editorOpened(IEditor *editor)
|
||||
else
|
||||
return;
|
||||
|
||||
// Duplicated editors are not signalled by the EditorManager. Track them nevertheless.
|
||||
connect(editor, &IEditor::editorDuplicated, this, [this, editor](IEditor *duplicate) {
|
||||
editorOpened(duplicate);
|
||||
connect(duplicate, &QObject::destroyed, this, [this, duplicate] {
|
||||
m_editorToHandler.remove(duplicate);
|
||||
});
|
||||
});
|
||||
|
||||
auto tew = TextEditorWidget::fromEditor(editor);
|
||||
|
||||
//qDebug() << "OPENING: " << editor << editor->widget()
|
||||
|
||||
Reference in New Issue
Block a user