forked from qt-creator/qt-creator
Fix overriding the default session
To reproduce the bug: 1) Load a project into the default session.cpp 2) Close creator (which saves the session) 3) Start Creator 4) Create a new session and switch to it => This calls createImpl and overrides the default session, even though it shouldn't 5) Load the default session, which will now be empty Change-Id: I7c23fba8c1f9fd32cc95b3b9206afc422c1f0133 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -545,7 +545,9 @@ bool SessionManager::createImpl(const QString &fileName)
|
||||
bool success = true;
|
||||
|
||||
if (!m_file->fileName().isEmpty()) {
|
||||
if (!save() || !clear())
|
||||
if (isDefaultVirgin()) {
|
||||
// do not save initial and virgin default session
|
||||
} else if (!save() || !clear())
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user