mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-30 17:50:44 +02:00
GUI: sendCoinsDialog, remove duplicate wallet().getBalances() call
Inside setModel, we call 'wallet().getBalances()', to set the view balance, right before calling 'updateDisplayUnit' which calls 'wallet().getBalances()' internally and re-sets the view balance again.
This commit is contained in:
parent
a8098f2cef
commit
e62958dc81
@ -164,11 +164,9 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
||||
}
|
||||
}
|
||||
|
||||
interfaces::WalletBalances balances = _model->wallet().getBalances();
|
||||
setBalance(balances);
|
||||
connect(_model, &WalletModel::balanceChanged, this, &SendCoinsDialog::setBalance);
|
||||
connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &SendCoinsDialog::updateDisplayUnit);
|
||||
updateDisplayUnit();
|
||||
connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &SendCoinsDialog::refreshBalance);
|
||||
refreshBalance();
|
||||
|
||||
// Coin Control
|
||||
connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
|
||||
@ -718,7 +716,7 @@ void SendCoinsDialog::setBalance(const interfaces::WalletBalances& balances)
|
||||
}
|
||||
}
|
||||
|
||||
void SendCoinsDialog::updateDisplayUnit()
|
||||
void SendCoinsDialog::refreshBalance()
|
||||
{
|
||||
setBalance(model->wallet().getBalances());
|
||||
ui->customFee->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
||||
|
@ -97,7 +97,7 @@ private Q_SLOTS:
|
||||
void on_buttonMinimizeFee_clicked();
|
||||
void removeEntry(SendCoinsEntry* entry);
|
||||
void useAvailableBalance(SendCoinsEntry* entry);
|
||||
void updateDisplayUnit();
|
||||
void refreshBalance();
|
||||
void coinControlFeatureChanged(bool);
|
||||
void coinControlButtonClicked();
|
||||
void coinControlChangeChecked(int);
|
||||
|
Loading…
x
Reference in New Issue
Block a user