From 68bf3cd29935d4a08c3b32a617f338854a795b88 Mon Sep 17 00:00:00 2001 From: Paddle Date: Sun, 30 Jul 2023 15:37:18 +0200 Subject: [PATCH] Change the default of 'Save thumbnail on doc save' --- src/Gui/AutoSaver.cpp | 2 +- src/Gui/DlgSettingsDocument.ui | 3 +++ src/Gui/Document.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Gui/AutoSaver.cpp b/src/Gui/AutoSaver.cpp index a4e9125c16..6da991376d 100644 --- a/src/Gui/AutoSaver.cpp +++ b/src/Gui/AutoSaver.cpp @@ -161,7 +161,7 @@ void AutoSaver::saveDocument(const std::string& name, AutoSaveProperty& saver) // associated 3d view is not active Base::Reference hGrp = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/Document"); - bool save = hGrp->GetBool("SaveThumbnail",false); + bool save = hGrp->GetBool("SaveThumbnail",true); hGrp->SetBool("SaveThumbnail",false); getMainWindow()->showMessage(tr("Please wait until the AutoRecovery file has been saved..."), 5000); diff --git a/src/Gui/DlgSettingsDocument.ui b/src/Gui/DlgSettingsDocument.ui index 687c69eee3..6e9a18fc34 100644 --- a/src/Gui/DlgSettingsDocument.ui +++ b/src/Gui/DlgSettingsDocument.ui @@ -340,6 +340,9 @@ automatically run a file recovery when it is started. A thumbnail will be stored when document is saved + + true + Save thumbnail into project file when saving document diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index a009cf99f6..d90c609d50 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -1350,7 +1350,7 @@ void Document::Save (Base::Writer &writer) const writer.addFile("GuiDocument.xml", this); ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Document"); - if (hGrp->GetBool("SaveThumbnail", false)) { + if (hGrp->GetBool("SaveThumbnail", true)) { int size = hGrp->GetInt("ThumbnailSize", 128); size = Base::clamp(size, 64, 512); std::list mdi = getMDIViews();