Change the default of 'Save thumbnail on doc save'

This commit is contained in:
Paddle
2023-07-30 15:37:18 +02:00
parent 87c528c250
commit 68bf3cd299
3 changed files with 5 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ void AutoSaver::saveDocument(const std::string& name, AutoSaveProperty& saver)
// associated 3d view is not active
Base::Reference<ParameterGrp> 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);

View File

@@ -340,6 +340,9 @@ automatically run a file recovery when it is started.</string>
<property name="toolTip">
<string>A thumbnail will be stored when document is saved</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>Save thumbnail into project file when saving document</string>
</property>

View File

@@ -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<int>(size, 64, 512);
std::list<MDIView*> mdi = getMDIViews();