forked from qt-creator/qt-creator
TextEditor: After refactoring, do not open the same document again
... if it is already visible in a different split view. Activate that one instead. Fixes: QTCREATORBUG-13145 Change-Id: I5facfb23e8e8163d8653c7926d5bf6848f42bd9a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -124,7 +124,9 @@ bool RefactoringChanges::removeFile(const QString &fileName) const
|
||||
TextEditorWidget *RefactoringChanges::openEditor(const QString &fileName, bool activate, int line, int column)
|
||||
{
|
||||
EditorManager::OpenEditorFlags flags = EditorManager::IgnoreNavigationHistory;
|
||||
if (!activate)
|
||||
if (activate)
|
||||
flags |= EditorManager::SwitchSplitIfAlreadyVisible;
|
||||
else
|
||||
flags |= EditorManager::DoNotChangeCurrentEditor;
|
||||
if (line != -1) {
|
||||
// openEditorAt uses a 1-based line and a 0-based column!
|
||||
|
Reference in New Issue
Block a user