mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-01 02:30:51 +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, &WalletModel::balanceChanged, this, &SendCoinsDialog::setBalance);
|
||||||
connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &SendCoinsDialog::updateDisplayUnit);
|
connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &SendCoinsDialog::refreshBalance);
|
||||||
updateDisplayUnit();
|
refreshBalance();
|
||||||
|
|
||||||
// Coin Control
|
// Coin Control
|
||||||
connect(_model->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
|
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());
|
setBalance(model->wallet().getBalances());
|
||||||
ui->customFee->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
ui->customFee->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
||||||
|
@ -97,7 +97,7 @@ private Q_SLOTS:
|
|||||||
void on_buttonMinimizeFee_clicked();
|
void on_buttonMinimizeFee_clicked();
|
||||||
void removeEntry(SendCoinsEntry* entry);
|
void removeEntry(SendCoinsEntry* entry);
|
||||||
void useAvailableBalance(SendCoinsEntry* entry);
|
void useAvailableBalance(SendCoinsEntry* entry);
|
||||||
void updateDisplayUnit();
|
void refreshBalance();
|
||||||
void coinControlFeatureChanged(bool);
|
void coinControlFeatureChanged(bool);
|
||||||
void coinControlButtonClicked();
|
void coinControlButtonClicked();
|
||||||
void coinControlChangeChecked(int);
|
void coinControlChangeChecked(int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user