forked from qt-creator/qt-creator
ModeManager: Don't switch to weclome mode for session restore
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user