changeset 26979:64ae7d7740bd

[Qt] Change RBF checkbox to reflect -walletrbf setting Before this commit, the checkbox would always start off unchecked. After this commit it will respect the -walletrbf setting (which is currently false by default).
author Russell Yanofsky <russ@yanofsky.org>
date Thu, 19 Jan 2017 18:19:39 -0500
parents f08a25b37c12
children bac4978c7092
files src/qt/sendcoinsdialog.cpp src/qt/walletmodel.cpp src/qt/walletmodel.h
diffstat 3 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/qt/sendcoinsdialog.cpp	Tue Apr 05 16:55:41 2016 +0200
+++ b/src/qt/sendcoinsdialog.cpp	Thu Jan 19 18:19:39 2017 -0500
@@ -112,6 +112,7 @@
     ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
     ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
     ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
+    ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
     minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
 }
 
--- a/src/qt/walletmodel.cpp	Tue Apr 05 16:55:41 2016 +0200
+++ b/src/qt/walletmodel.cpp	Thu Jan 19 18:19:39 2017 -0500
@@ -706,3 +706,8 @@
 {
     return nTxConfirmTarget;
 }
+
+bool WalletModel::getDefaultWalletRbf() const
+{
+    return fWalletRbf;
+}
--- a/src/qt/walletmodel.h	Tue Apr 05 16:55:41 2016 +0200
+++ b/src/qt/walletmodel.h	Thu Jan 19 18:19:39 2017 -0500
@@ -213,6 +213,8 @@
 
     int getDefaultConfirmTarget() const;
 
+    bool getDefaultWalletRbf() const;
+
 private:
     CWallet *wallet;
     bool fHaveWatchOnly;