Commit 0d10ecd6 authored by Eike Ziller's avatar Eike Ziller

Session: Fix that active mode was not restored

Change-Id: I3a94f1c18eb187716bfa275cfe8869c4fe046500
Task-number: QTCREATORBUG-1746
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent faca938e
......@@ -941,6 +941,9 @@ bool SessionManager::loadSession(const QString &session)
d->restoreValues(reader);
emit m_instance->aboutToLoadSession(session);
// retrieve all values before the following code could change them again
Id modeId = Id::fromSetting(value(QLatin1String("ActiveMode")));
QColor c = QColor(reader.restoreValue(QLatin1String("Color")).toString());
if (c.isValid())
StyleHelper::setBaseColor(c);
......@@ -965,7 +968,6 @@ bool SessionManager::loadSession(const QString &session)
d->m_future = QFutureInterface<void>();
// restore the active mode
Id modeId = Id::fromSetting(value(QLatin1String("ActiveMode")));
if (!modeId.isValid())
modeId = Id(Core::Constants::MODE_EDIT);
......
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