From 85d5319716b7b31b27bc7950d756465ae472f11d Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 24 Oct 2016 07:21:51 +0000 Subject: Qt: Ensure UI updates only come from the currently selected walletView --- src/qt/bitcoingui.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/qt/bitcoingui.cpp') diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 92fb3f1904..b39aaef46c 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -21,6 +21,7 @@ #ifdef ENABLE_WALLET #include #include +#include #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) -- cgit v1.2.3