diff options
Diffstat (limited to 'src/plugins/debugger/enginemanager.cpp')
-rw-r--r-- | src/plugins/debugger/enginemanager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp index 68f800c5b1..8bb62ede9d 100644 --- a/src/plugins/debugger/enginemanager.cpp +++ b/src/plugins/debugger/enginemanager.cpp @@ -421,6 +421,18 @@ void EngineManager::activateDebugMode() } } +void EngineManager::deactivateDebugMode() +{ + if (ModeManager::currentModeId() == Constants::MODE_DEBUG && d->m_previousMode.isValid()) { + // If stopping the application also makes Qt Creator active (as the + // "previously active application"), doing the switch synchronously + // leads to funny effects with floating dock widgets + const Core::Id mode = d->m_previousMode; + QTimer::singleShot(0, d, [mode]() { ModeManager::activateMode(mode); }); + d->m_previousMode = Id(); + } +} + bool EngineManager::isLastOf(const QString &type) { int count = 0; |