diff options
author | David Schulz <david.schulz@qt.io> | 2020-09-16 06:09:22 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-09-16 07:29:30 +0000 |
commit | af88afe943fef260f59c530313d2cef8247ca601 (patch) | |
tree | db426cca7e3481ed872db4279909ac13fe33eb68 | |
parent | e371eafd4bde6f83ca7c9dd1373e41017851fe42 (diff) |
Debugger: Activate split that contains the breakpoint being hit
Do not change the current editor after hitting a breakpoint if we
already have an editor open in another split, but switch the focus to
that split.
Task-number: QTCREATORBUG-24646
Change-Id: Id85cecdfb522807bafa097e578509853326a2e31
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/plugins/debugger/debuggerengine.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 3b0a06c2b9..c7540e8ae1 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1088,10 +1088,12 @@ void DebuggerEngine::gotoLocation(const Location &loc) const QString file = loc.fileName().toString(); const int line = loc.lineNumber(); bool newEditor = false; - IEditor *editor = EditorManager::openEditor( - file, Id(), - EditorManager::IgnoreNavigationHistory | EditorManager::DoNotSwitchToDesignMode, - &newEditor); + IEditor *editor = EditorManager::openEditor(file, + Id(), + EditorManager::IgnoreNavigationHistory + | EditorManager::DoNotSwitchToDesignMode + | EditorManager::SwitchSplitIfAlreadyVisible, + &newEditor); QTC_ASSERT(editor, return); // Unreadable file? editor->gotoLine(line, 0, !boolSetting(StationaryEditorWhileStepping)); |