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>
This commit is contained in:
David Schulz
2020-09-16 06:09:22 +02:00
parent e371eafd4b
commit af88afe943

View File

@@ -1088,9 +1088,11 @@ 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,
IEditor *editor = EditorManager::openEditor(file,
Id(),
EditorManager::IgnoreNavigationHistory
| EditorManager::DoNotSwitchToDesignMode
| EditorManager::SwitchSplitIfAlreadyVisible,
&newEditor);
QTC_ASSERT(editor, return); // Unreadable file?