diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 0bf12de806e53793034d66bc85747603092b0d76..e1894406ddfc182a890e0241634af349c7aa598b 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -96,7 +96,6 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage) void CorePlugin::extensionsInitialized() { m_mainWindow->extensionsInitialized(); - m_mainWindow->modeManager()->switchToDefaultMode(); } void CorePlugin::remoteCommand(const QStringList & /* options */, const QStringList &args) diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index 98c4222c8e580e3b5f5b8343018e4caa52023bac..091bcff4f4fcad49c306dc6997c97719fdc5758d 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -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; diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h index e92c927282804f215cad083aee599696df4788a1..ea0fb71618805b9a80413db4f47ddc9053453a55 100644 --- a/src/plugins/coreplugin/modemanager.h +++ b/src/plugins/coreplugin/modemanager.h @@ -66,8 +66,6 @@ public: void addProjectSelector(QAction *action); void addWidget(QWidget *widget); - void switchToDefaultMode(); - signals: void currentModeAboutToChange(Core::IMode *mode); diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 46c59e871445fd2034522b081601b89ea32fe83e..4ef9768394aa8092487f280877191d793800f9a1 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -76,6 +76,7 @@ bool WelcomePlugin::initialize(const QStringList & /* arguments */, QString * /* void WelcomePlugin::extensionsInitialized() { m_welcomeMode->initPlugins(); + Core::ModeManager::instance()->activateMode(m_welcomeMode->id()); } Q_EXPORT_PLUGIN(WelcomePlugin)