Qt: Ensure UI updates only come from the currently selected walletView

This commit is contained in:
Luke Dashjr
2016-10-24 07:21:51 +00:00
committed by Jonas Schnelli
parent e449f9a9e6
commit 85d5319716
7 changed files with 32 additions and 10 deletions

View File

@@ -21,6 +21,7 @@
#ifdef ENABLE_WALLET
#include <qt/walletframe.h>
#include <qt/walletmodel.h>
#include <qt/walletview.h>
#endif // ENABLE_WALLET
#ifdef Q_OS_MAC
@@ -1097,6 +1098,20 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
}
}
void BitcoinGUI::updateWalletStatus()
{
if (!walletFrame) {
return;
}
WalletView * const walletView = walletFrame->currentWalletView();
if (!walletView) {
return;
}
WalletModel * const walletModel = walletView->getWalletModel();
setEncryptionStatus(walletModel->getEncryptionStatus());
setHDStatus(walletModel->hdEnabled());
}
#endif // ENABLE_WALLET
void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)