summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnar Thomsen <[email protected]>2016-07-23 22:11:56 +0200
committerRagnar Thomsen <[email protected]>2016-07-23 22:11:56 +0200
commit762c0d7455f1522835ac60d887ac140fb308b46b (patch)
tree78855f4e4f90b48701bfd999ac9598530e52c4f2
parentd56aabf4b0a220c46cad5d97c3e2df6fa19b1dae (diff)
Fix creating archives that dont support compression level
CompressionOptionsWidget needs to return compression level -1 for archives that dont support compression levels (e.g. uncompressed tars). Thanks to mvlabat for discovering this bug.
-rw-r--r--kerfuffle/compressionoptionswidget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/kerfuffle/compressionoptionswidget.cpp b/kerfuffle/compressionoptionswidget.cpp
index 8238071..efdc964 100644
--- a/kerfuffle/compressionoptionswidget.cpp
+++ b/kerfuffle/compressionoptionswidget.cpp
@@ -71,7 +71,11 @@ CompressionOptions CompressionOptionsWidget::commpressionOptions() const
int CompressionOptionsWidget::compressionLevel() const
{
- return compLevelSlider->value();
+ if (compLevelSlider->isEnabled()) {
+ return compLevelSlider->value();
+ } else {
+ return -1;
+ }
}
ulong CompressionOptionsWidget::volumeSize() const