aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/advanceddockingsystem/dockmanager.h
diff options
context:
space:
mode:
authorHenning Gruendl <[email protected]>2023-11-23 12:33:21 +0100
committerHenning Gründl <[email protected]>2023-11-24 13:36:10 +0000
commitb5da50338e39650a58669f0b933017f5e0bd50ea (patch)
tree1995af7d420bda52afe625ae7cad78748860ef09 /src/libs/advanceddockingsystem/dockmanager.h
parent66bda77d432f3039c222e9621b08b5347bdcbcd4 (diff)
ADS: Prevent saving not displayed workspace
Prevent saving a workspace that was never shown, e.g. only welcome page was shown and QtDS was closed again. This scenario causes the workspace to have wrong sizes hence the next time this workspace will be shown it will look distorted. This behavior is a result of the startup workspace always being loaded and always saved. If the workspace was never visually shown, it didn't get the correct geometry from the main window which results in wrong sizes of splitters in the workspace. Change-Id: I780b561e98e72f7d48becf32d178fb600b5d4336 Reviewed-by: Qt CI Patch Build Bot <[email protected]> Reviewed-by: Tim Jenssen <[email protected]>
Diffstat (limited to 'src/libs/advanceddockingsystem/dockmanager.h')
-rw-r--r--src/libs/advanceddockingsystem/dockmanager.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libs/advanceddockingsystem/dockmanager.h b/src/libs/advanceddockingsystem/dockmanager.h
index c11bd6ebb16..015e6724340 100644
--- a/src/libs/advanceddockingsystem/dockmanager.h
+++ b/src/libs/advanceddockingsystem/dockmanager.h
@@ -733,6 +733,13 @@ public:
static QString readDisplayName(const Utils::FilePath &filePath);
static bool writeDisplayName(const Utils::FilePath &filePath, const QString &displayName);
+ /**
+ * This is used to limit saving of workspaces to only when they were actually presented ones,
+ * otherwise it could lead to distorted workspace due to the correct windows sizes not being
+ * set when never presented/rendered.
+ */
+ void aboutToShow();
+
signals:
void aboutToUnloadWorkspace(QString fileName);
void aboutToLoadWorkspace(QString fileName);