Commit 7c35a577 authored by con's avatar con
Browse files

Don't switch away from debug mode when jumping to line via locator

Task-number: QTCREATORBUG-3192
parent fa2ae04b
......@@ -1272,9 +1272,7 @@ void EditorManager::switchToPreferedMode()
if (preferedMode.isEmpty())
preferedMode = Constants::MODE_EDIT_TYPE;
if (m_d->m_core->modeManager()->currentMode()->type() != preferedMode) {
m_d->m_core->modeManager()->activateModeType(preferedMode);
}
m_d->m_core->modeManager()->activateModeType(preferedMode);
}
IEditor *EditorManager::openEditorWithContents(const QString &editorId,
......
......@@ -151,6 +151,8 @@ IMode *ModeManager::mode(const QString &id) const
void ModeManager::activateModeType(const QString &type)
{
if (currentMode() && currentMode()->type() == type)
return;
int index = -1;
for (int i = 0; i < d->m_modes.count(); ++i) {
if (d->m_modes.at(i)->type() == type) {
......
......@@ -66,7 +66,7 @@ void LineNumberFilter::accept(FilterEntry selection) const
editorManager->addCurrentPositionToNavigationHistory();
editor->gotoLine(selection.internalData.toInt());
editor->widget()->setFocus();
Core::ModeManager::instance()->activateMode(Core::Constants::MODE_EDIT);
Core::ModeManager::instance()->activateModeType(Core::Constants::MODE_EDIT_TYPE);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment