forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user