mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-20 07:00:44 +02:00
Qt/Intro: Allow changing prune setting even when specified on commandline
This commit is contained in:
parent
6e564fe617
commit
a2bcbef77f
@ -154,7 +154,6 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si
|
||||
default:
|
||||
ui->prune->setChecked(true);
|
||||
}
|
||||
ui->prune->setEnabled(false);
|
||||
}
|
||||
ui->pruneMiB->setValue(m_prune_target_mib);
|
||||
ui->pruneMiB->setToolTip(ui->prune->toolTip());
|
||||
|
@ -238,6 +238,9 @@ bool OptionsModel::Init(bilingual_str& error)
|
||||
// and we want command-line parameters to overwrite the GUI settings.
|
||||
for (OptionID option : {DatabaseCache, ThreadsScriptVerif, SpendZeroConfChange, ExternalSignerPath, MapPortUPnP,
|
||||
MapPortNatpmp, Listen, Server, PruneTristate, ProxyUse, ProxyUseTor, Language}) {
|
||||
// isSettingIgnored will have a false positive here during first-run prune changes
|
||||
if (option == PruneTristate && m_prune_forced_by_gui) continue;
|
||||
|
||||
std::string setting = SettingName(option);
|
||||
if (node().isSettingIgnored(setting)) addOverriddenOption("-" + setting);
|
||||
try {
|
||||
@ -397,6 +400,7 @@ void OptionsModel::SetPruneTargetMiB(int prune_target_mib)
|
||||
// this point because this function is only called after the intro screen is
|
||||
// shown, before the node starts.
|
||||
node().forceSetting("prune", new_value);
|
||||
m_prune_forced_by_gui = true;
|
||||
|
||||
// Update settings.json if value configured in intro screen is different
|
||||
// from saved value. Avoid writing settings.json if bitcoin.conf value
|
||||
|
@ -138,6 +138,7 @@ private:
|
||||
|
||||
/* settings that were overridden by command-line */
|
||||
QString strOverriddenByCommandLine;
|
||||
bool m_prune_forced_by_gui{false};
|
||||
|
||||
static QString FontChoiceToString(const OptionsModel::FontChoice&);
|
||||
static FontChoice FontChoiceFromString(const QString&);
|
||||
|
Loading…
Reference in New Issue
Block a user