forked from qt-creator/qt-creator
Session: Fix that active mode was not restored
Change-Id: I3a94f1c18eb187716bfa275cfe8869c4fe046500 Task-number: QTCREATORBUG-1746 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -941,6 +941,9 @@ bool SessionManager::loadSession(const QString &session)
|
|||||||
d->restoreValues(reader);
|
d->restoreValues(reader);
|
||||||
emit m_instance->aboutToLoadSession(session);
|
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());
|
QColor c = QColor(reader.restoreValue(QLatin1String("Color")).toString());
|
||||||
if (c.isValid())
|
if (c.isValid())
|
||||||
StyleHelper::setBaseColor(c);
|
StyleHelper::setBaseColor(c);
|
||||||
@@ -965,7 +968,6 @@ bool SessionManager::loadSession(const QString &session)
|
|||||||
d->m_future = QFutureInterface<void>();
|
d->m_future = QFutureInterface<void>();
|
||||||
|
|
||||||
// restore the active mode
|
// restore the active mode
|
||||||
Id modeId = Id::fromSetting(value(QLatin1String("ActiveMode")));
|
|
||||||
if (!modeId.isValid())
|
if (!modeId.isValid())
|
||||||
modeId = Id(Core::Constants::MODE_EDIT);
|
modeId = Id(Core::Constants::MODE_EDIT);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user