+ make sure to use valid compression level
This commit is contained in:
parent
52dc0dda47
commit
3de3aa49d3
|
@ -945,6 +945,7 @@ bool Document::save (void)
|
|||
{
|
||||
int compression = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Document")->GetInt("CompressionLevel",3);
|
||||
compression = Base::clamp<int>(compression, Z_NO_COMPRESSION, Z_BEST_COMPRESSION);
|
||||
|
||||
if (*(FileName.getValue()) != '\0') {
|
||||
LastModifiedDate.setValue(Base::TimeInfo::currentDateTimeString());
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "PreCompiled.h"
|
||||
#include <climits>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "DlgSettingsDocumentImp.h"
|
||||
#include "PrefWidgets.h"
|
||||
|
@ -40,6 +41,8 @@ DlgSettingsDocumentImp::DlgSettingsDocumentImp( QWidget* parent )
|
|||
{
|
||||
this->setupUi(this);
|
||||
prefCountBackupFiles->setMaximum(INT_MAX);
|
||||
prefCompression->setMinimum(Z_NO_COMPRESSION);
|
||||
prefCompression->setMaximum(Z_BEST_COMPRESSION);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user