From f009d5f151c5ed2e306ffd1b179d500684073a87 Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Thu, 14 Jun 2018 13:37:09 +0430 Subject: CorePlugin: Switch split if remote command tries to open an already opened file It seems more natural that remote commands don't change current editor of active view if file is already opened in another view. Change-Id: Ie27de0d159cae6e63fa1d477fab59887a0e6d198 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/coreplugin/mainwindow.cpp') diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index cd76507098..c8ad39bea0 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -845,6 +845,8 @@ IDocument *MainWindow::openFiles(const QStringList &fileNames, QFlags emFlags; if (flags & ICore::CanContainLineAndColumnNumbers) emFlags |= EditorManager::CanContainLineAndColumnNumber; + if (flags & ICore::SwitchSplitIfAlreadyVisible) + emFlags |= EditorManager::SwitchSplitIfAlreadyVisible; IEditor *editor = EditorManager::openEditor(absoluteFilePath, Id(), emFlags); if (!editor) { if (flags & ICore::StopOnLoadFail) -- cgit v1.2.1