diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 3e177af53cd..d1b16bcf9f9 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -731,9 +731,7 @@ 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); - const bool privacy = isPrivacyModeActivated(); - wallet_view->setPrivacy(privacy); - enableHistoryAction(privacy); + wallet_view->setPrivacy(isPrivacyModeActivated()); const QString display_name = walletModel->getDisplayName(); m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel)); } @@ -769,6 +767,7 @@ void BitcoinGUI::setCurrentWallet(WalletModel* wallet_model) break; } } + setWalletActionsEnabled(true); updateWindowTitle(); m_migrate_wallet_action->setEnabled(wallet_model->wallet().isLegacy()); } @@ -805,6 +804,9 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled) m_close_wallet_action->setEnabled(enabled); m_close_all_wallets_action->setEnabled(enabled); m_migrate_wallet_action->setEnabled(enabled); +#ifdef ENABLE_WALLET + enableHistoryAction(enabled || isPrivacyModeActivated()); +#endif // ENABLE_WALLET } void BitcoinGUI::createTrayIcon()