summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/mainwindow.cpp
diff options
context:
space:
mode:
authorRazi Alavizadeh <s.r.alavizadeh@gmail.com>2018-06-14 13:37:09 +0430
committerRazi Alavizadeh <s.r.alavizadeh@gmail.com>2018-06-22 18:04:54 +0000
commitf009d5f151c5ed2e306ffd1b179d500684073a87 (patch)
tree7088a75240ea1840a98ec4ac0832c37a40c47e81 /src/plugins/coreplugin/mainwindow.cpp
parentffc651d54ee619c8779a79c6f430efbf106ee61b (diff)
downloadqt-creator-f009d5f151c5ed2e306ffd1b179d500684073a87.tar.gz
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 <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/mainwindow.cpp')
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
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<EditorManager::OpenEditorFlag> 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)