aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2022-08-30 18:54:46 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2023-06-28 13:27:32 +0000
commit420a983e25d2f3ac3cc4d537bf223682be651604 (patch)
tree1da250d450763b25b74df5654920120e278c8cae /src/qt
parentbbbf89a9de0757c44880495244f90967f7147c0d (diff)
Bugfix: GUI/Intro: Disable GUI prune option if -prune is set, regardless of set value
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/intro.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 6423e457aa..bb03899f07 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -141,8 +141,8 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si
const int min_prune_target_GB = std::ceil(MIN_DISK_SPACE_FOR_BLOCK_FILES / 1e9);
ui->pruneGB->setRange(min_prune_target_GB, std::numeric_limits<int>::max());
- if (gArgs.GetIntArg("-prune", 0) > 1) { // -prune=1 means enabled, above that it's a size in MiB
- ui->prune->setChecked(true);
+ if (gArgs.IsArgSet("-prune")) {
+ ui->prune->setChecked(gArgs.GetIntArg("-prune", 0) >= 1);
ui->prune->setEnabled(false);
}
ui->pruneGB->setValue(m_prune_target_gb);