Browse Source

[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).
0.15
Russell Yanofsky 8 years ago
parent
commit
c4e4792c53
  1. 1
      src/qt/sendcoinsdialog.cpp
  2. 5
      src/qt/walletmodel.cpp
  3. 2
      src/qt/walletmodel.h

1
src/qt/sendcoinsdialog.cpp

@ -112,6 +112,7 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true); ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong()); ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool()); ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool()); minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
} }

5
src/qt/walletmodel.cpp

@ -706,3 +706,8 @@ int WalletModel::getDefaultConfirmTarget() const
{ {
return nTxConfirmTarget; return nTxConfirmTarget;
} }
bool WalletModel::getDefaultWalletRbf() const
{
return fWalletRbf;
}

2
src/qt/walletmodel.h

@ -213,6 +213,8 @@ public:
int getDefaultConfirmTarget() const; int getDefaultConfirmTarget() const;
bool getDefaultWalletRbf() const;
private: private:
CWallet *wallet; CWallet *wallet;
bool fHaveWatchOnly; bool fHaveWatchOnly;

Loading…
Cancel
Save