Commit 9ff6490d authored by Eike Ziller's avatar Eike Ziller
Browse files

Save mode visibility in a separate property.

Instead of using the actual visibility state of the widget, which might
have screwed things up if for some reason the widget itself was not
visible the moment settings are saved.

Change-Id: I7ae89259dc925f799bca413b537b65e9e689e1b7
Reviewed-by: default avatarJarek Kobus <>
parent 0e75e5cb
......@@ -73,6 +73,7 @@ struct ModeManagerPrivate
Context m_addedContexts;
int m_oldCurrent;
bool m_saveSettingsOnModeChange;
bool m_modeSelectorVisible;
static ModeManagerPrivate *d;
......@@ -100,6 +101,8 @@ ModeManager::ModeManager(Internal::MainWindow *mainWindow,
d->m_actionBar = new Internal::FancyActionBar(modeStack);
d->m_saveSettingsOnModeChange = false;
d->m_modeSelectorVisible = true;
connect(d->m_modeStack, SIGNAL(currentAboutToShow(int)), SLOT(currentTabAboutToChange(int)));
connect(d->m_modeStack, SIGNAL(currentChanged(int)), SLOT(currentTabChanged(int)));
......@@ -339,12 +342,13 @@ void ModeManager::setFocusToCurrentMode()
void ModeManager::setModeSelectorVisible(bool visible)
d->m_modeSelectorVisible = visible;
bool ModeManager::isModeSelectorVisible()
return d->m_modeStack->isSelectionWidgetVisible();
return d->m_modeSelectorVisible;
ModeManager *ModeManager::instance()
Supports Markdown
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