QmlDesigner: Fix initial workspace change

Task-number: QDS-1766
Task-number: QDS-2207
Change-Id: Ibc86b4cf5914cb10e8917198095b90073b159290
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2020-06-25 11:04:06 +02:00
committed by Thomas Hartmann
parent 15588ea166
commit 131b672f55

View File

@@ -110,7 +110,7 @@ namespace ADS
bool m_autorestoreLastWorkspace; // This option is set in the Workspace Manager!
QSettings *m_settings = nullptr;
QString m_workspacePresetsPath;
bool m_modeChangeState;
bool m_modeChangeState = false;
/**
* Private data constructor
@@ -719,9 +719,9 @@ namespace ADS
bool DockManager::openWorkspace(const QString &workspace)
{
// Do nothing if we have that workspace already loaded, exception if the
// workspace is the default virgin workspace we still want to be able to
// load the default workspace.
// Do nothing if we have that workspace already loaded, exception if it is
// a preset workspace. In this case we still want to be able to load the
// default workspace to undo potential user changes.
if (workspace == d->m_workspaceName && !isWorkspacePreset(workspace))
return true;