forked from qt-creator/qt-creator
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:
@@ -1088,10 +1088,12 @@ void DebuggerEngine::gotoLocation(const Location &loc)
|
|||||||
const QString file = loc.fileName().toString();
|
const QString file = loc.fileName().toString();
|
||||||
const int line = loc.lineNumber();
|
const int line = loc.lineNumber();
|
||||||
bool newEditor = false;
|
bool newEditor = false;
|
||||||
IEditor *editor = EditorManager::openEditor(
|
IEditor *editor = EditorManager::openEditor(file,
|
||||||
file, Id(),
|
Id(),
|
||||||
EditorManager::IgnoreNavigationHistory | EditorManager::DoNotSwitchToDesignMode,
|
EditorManager::IgnoreNavigationHistory
|
||||||
&newEditor);
|
| EditorManager::DoNotSwitchToDesignMode
|
||||||
|
| EditorManager::SwitchSplitIfAlreadyVisible,
|
||||||
|
&newEditor);
|
||||||
QTC_ASSERT(editor, return); // Unreadable file?
|
QTC_ASSERT(editor, return); // Unreadable file?
|
||||||
|
|
||||||
editor->gotoLine(line, 0, !boolSetting(StationaryEditorWhileStepping));
|
editor->gotoLine(line, 0, !boolSetting(StationaryEditorWhileStepping));
|
||||||
|
Reference in New Issue
Block a user