aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-10-24 07:21:51 +0000
committerJonas Schnelli <dev@jonasschnelli.ch>2018-03-06 12:03:26 +0800
commit85d5319716b7b31b27bc7950d756465ae472f11d (patch)
tree74dc713c03bcbf6608a8ad1e79a3e9a70b120c22 /src/qt/bitcoingui.cpp
parente449f9a9e620fb909eb7b32d815b413d235f05ad (diff)
downloadbitcoin-85d5319716b7b31b27bc7950d756465ae472f11d.tar.xz
Qt: Ensure UI updates only come from the currently selected walletView
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp15
1 files changed, 15 insertions, 0 deletions
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 <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)