From 254841dbbf5c1ed5ce98a5753ba22d24b796114f Mon Sep 17 00:00:00 2001 From: octaeder <102688820+octaeder@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:35:12 +0100 Subject: [PATCH] handle maximized correctly when maximized window is embedded and then txs closed --- src/pdfviewer/PDFDocument.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pdfviewer/PDFDocument.cpp b/src/pdfviewer/PDFDocument.cpp index ac57fda1ce..f150c27d0c 100644 --- a/src/pdfviewer/PDFDocument.cpp +++ b/src/pdfviewer/PDFDocument.cpp @@ -4298,13 +4298,15 @@ PDFDocument *PDFDocument::findDocument(const QString &fileName) void PDFDocument::saveGeometryToConfig() { - if (!isMaximized() && !isFullScreen()) { - globalConfig->windowLeft = x(); - globalConfig->windowTop = y(); - globalConfig->windowWidth = width(); - globalConfig->windowHeight = height(); + if (!embeddedMode) { + if (!isMaximized() && !isFullScreen()) { + globalConfig->windowLeft = x(); + globalConfig->windowTop = y(); + globalConfig->windowWidth = width(); + globalConfig->windowHeight = height(); + } + globalConfig->windowMaximized = isMaximized(); } - globalConfig->windowMaximized = isMaximized(); globalConfig->windowState = saveState(); globalConfig->toolbarVisible = toolBar->isVisible(); globalConfig->annotationPanelVisible = annotationPanel->isVisible();