Commit 6863b02e authored by dt's avatar dt
Browse files

ModeManager: Don't switch to weclome mode for session restore

parent 33c3e1cb
......@@ -83,7 +83,8 @@ ModeManagerPrivate::ModeManagerPrivate(Internal::MainWindow *mainWindow,
m_mainWindow(mainWindow),
m_modeStack(modeStack),
m_signalMapper(new QSignalMapper(q)),
m_oldCurrent(-1)
m_oldCurrent(-1),
m_switchedToMode(false)
{
}
......@@ -151,6 +152,7 @@ IMode *ModeManager::mode(const QString &id) const
void ModeManager::activateMode(const QString &id)
{
m_switchedToMode = true;
const int index = indexOf(id);
if (index >= 0)
d->m_modeStack->setCurrentIndex(index);
......@@ -311,7 +313,8 @@ void ModeManager::setFocusToCurrentMode()
void ModeManager::switchToDefaultMode()
{
d->m_modeStack->setCurrentIndex(0);
if (!m_switchedToMode)
d->m_modeStack->setCurrentIndex(0);
}
ModeManager *ModeManager::instance()
......
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