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();