@@ -456,6 +456,7 @@ void BitcoinGUI::createActions()
456456 m_wallet_controller->closeAllWallets (this );
457457 });
458458 connect (m_mask_values_action, &QAction::toggled, this , &BitcoinGUI::setPrivacy);
459+ connect (m_mask_values_action, &QAction::toggled, this , &BitcoinGUI::enableHistoryAction);
459460 }
460461#endif // ENABLE_WALLET
461462
@@ -668,6 +669,12 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
668669}
669670
670671#ifdef ENABLE_WALLET
672+ void BitcoinGUI::enableHistoryAction (bool privacy)
673+ {
674+ historyAction->setEnabled (!privacy);
675+ if (historyAction->isChecked ()) gotoOverviewPage ();
676+ }
677+
671678void BitcoinGUI::setWalletController (WalletController* wallet_controller)
672679{
673680 assert (!m_wallet_controller);
@@ -716,7 +723,9 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
716723 connect (wallet_view, &WalletView::encryptionStatusChanged, this , &BitcoinGUI::updateWalletStatus);
717724 connect (wallet_view, &WalletView::incomingTransaction, this , &BitcoinGUI::incomingTransaction);
718725 connect (this , &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
719- wallet_view->setPrivacy (isPrivacyModeActivated ());
726+ const bool privacy = isPrivacyModeActivated ();
727+ wallet_view->setPrivacy (privacy);
728+ enableHistoryAction (privacy);
720729 const QString display_name = walletModel->getDisplayName ();
721730 m_wallet_selector->addItem (display_name, QVariant::fromValue (walletModel));
722731}
0 commit comments