diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index def9a570b..ee4c47fd4 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -271,6 +271,8 @@ void OverviewPage::setWalletModel(WalletModel *model) this->walletModel = model; if(model && model->getOptionsModel()) { + // update the display unit, to not use the default ("DASH") + updateDisplayUnit(); // Keep up to date with wallet setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(), model->getAnonymizedBalance(), model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance()); @@ -290,9 +292,6 @@ void OverviewPage::setWalletModel(WalletModel *model) updateWatchOnlyLabels(model->haveWatchOnly()); connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool))); } - - // update the display unit, to not use the default ("DASH") - updateDisplayUnit(); } void OverviewPage::updateDisplayUnit() @@ -671,4 +670,4 @@ void OverviewPage::DisablePrivateSendCompletely() { ui->labelPrivateSendEnabled->setText("(" + tr("Disabled") + ")"); } fEnablePrivateSend = false; -} \ No newline at end of file +} diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 23105963c..d7fc3601e 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -36,9 +36,17 @@ WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *wallet, Op QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0), transactionTableModel(0), recentRequestsTableModel(0), - cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0), + cachedBalance(0), + cachedUnconfirmedBalance(0), + cachedImmatureBalance(0), + cachedAnonymizedBalance(0), + cachedWatchOnlyBalance(0), + cachedWatchUnconfBalance(0), + cachedWatchImmatureBalance(0), cachedEncryptionStatus(Unencrypted), - cachedNumBlocks(0) + cachedNumBlocks(0), + cachedTxLocks(0), + cachedPrivateSendRounds(0) { fHaveWatchOnly = wallet->HaveWatchOnly(); fForceCheckBalanceChanged = false;