Modes: Do the mode switching again like it used to be

It's more complicated then expected, to be detangled another day
This commit is contained in:
dt
2010-09-07 15:25:14 +02:00
parent 12e974db10
commit c2338d20a5
4 changed files with 2 additions and 13 deletions

View File

@@ -73,7 +73,6 @@ struct ModeManagerPrivate
QSignalMapper *m_signalMapper;
Context m_addedContexts;
int m_oldCurrent;
bool m_switchedToMode;
};
ModeManager *ModeManagerPrivate::m_instance = 0;
@@ -84,8 +83,7 @@ ModeManagerPrivate::ModeManagerPrivate(Internal::MainWindow *mainWindow,
m_mainWindow(mainWindow),
m_modeStack(modeStack),
m_signalMapper(new QSignalMapper(q)),
m_oldCurrent(-1),
m_switchedToMode(false)
m_oldCurrent(-1)
{
}
@@ -153,7 +151,6 @@ IMode *ModeManager::mode(const QString &id) const
void ModeManager::activateMode(const QString &id)
{
d->m_switchedToMode = true;
const int index = indexOf(id);
if (index >= 0)
d->m_modeStack->setCurrentIndex(index);
@@ -312,12 +309,6 @@ void ModeManager::setFocusToCurrentMode()
}
}
void ModeManager::switchToDefaultMode()
{
if (!d->m_switchedToMode)
d->m_modeStack->setCurrentIndex(0);
}
ModeManager *ModeManager::instance()
{
return ModeManagerPrivate::m_instance;