diff options
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c025d4e3aa..0eae7d3e79 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -456,6 +456,7 @@ void BitcoinGUI::createActions() m_wallet_controller->closeAllWallets(this); }); connect(m_mask_values_action, &QAction::toggled, this, &BitcoinGUI::setPrivacy); + connect(m_mask_values_action, &QAction::toggled, this, &BitcoinGUI::enableHistoryAction); } #endif // ENABLE_WALLET @@ -668,6 +669,12 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH } #ifdef ENABLE_WALLET +void BitcoinGUI::enableHistoryAction(bool privacy) +{ + historyAction->setEnabled(!privacy); + if (historyAction->isChecked()) gotoOverviewPage(); +} + void BitcoinGUI::setWalletController(WalletController* wallet_controller) { assert(!m_wallet_controller); @@ -716,7 +723,9 @@ void BitcoinGUI::addWallet(WalletModel* walletModel) connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus); connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction); connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy); - wallet_view->setPrivacy(isPrivacyModeActivated()); + const bool privacy = isPrivacyModeActivated(); + wallet_view->setPrivacy(privacy); + enableHistoryAction(privacy); const QString display_name = walletModel->getDisplayName(); m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel)); } |