mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-19 16:18:39 +02:00
AccountSwitcherDialog: ensure update on show
This commit is contained in:
@@ -21,11 +21,9 @@ AccountSwitcherDialog::AccountSwitcherDialog(Wallet *wallet, QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_wallet->subaddressAccount()->refresh();
|
||||
m_proxyModel->setSourceModel(m_model);
|
||||
|
||||
ui->label_totalBalance->setFont(ModelUtils::getMonospaceFont());
|
||||
ui->label_totalBalance->setText(WalletManager::displayAmount(m_wallet->balanceAll()));
|
||||
|
||||
this->setWindowModality(Qt::WindowModal);
|
||||
|
||||
@@ -52,9 +50,15 @@ AccountSwitcherDialog::AccountSwitcherDialog(Wallet *wallet, QWidget *parent)
|
||||
connect(m_wallet, &Wallet::currentSubaddressAccountChanged, this, &AccountSwitcherDialog::updateSelection);
|
||||
connect(m_wallet->subaddressAccount(), &SubaddressAccount::refreshFinished, this, &AccountSwitcherDialog::updateSelection);
|
||||
|
||||
this->update();
|
||||
this->updateSelection();
|
||||
}
|
||||
|
||||
void AccountSwitcherDialog::update() {
|
||||
ui->label_totalBalance->setText(WalletManager::displayAmount(m_wallet->balanceAll()));
|
||||
m_wallet->subaddressAccount()->refresh();
|
||||
}
|
||||
|
||||
void AccountSwitcherDialog::switchAccount() {
|
||||
auto row = this->currentEntry();
|
||||
if (!row) {
|
||||
|
||||
Reference in New Issue
Block a user