Skip to content

Commit 6c3b027

Browse files
gui: Fix TransactionsView on setCurrentWallet
Making sure that if the privacy mode is activaded during the wallet selection, the transaction view is not shown.
1 parent b2e531e commit 6c3b027

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/qt/bitcoingui.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
714714
WalletView* wallet_view = new WalletView(walletModel, platformStyle, walletFrame);
715715
if (!walletFrame->addView(wallet_view)) return;
716716

717+
wallet_view->setPrivacy(isPrivacyModeActivated());
718+
717719
rpcConsole->addWallet(walletModel);
718720
if (m_wallet_selector->count() == 0) {
719721
setWalletActionsEnabled(true);
@@ -731,9 +733,6 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
731733
connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus);
732734
connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction);
733735
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
734-
const bool privacy = isPrivacyModeActivated();
735-
wallet_view->setPrivacy(privacy);
736-
enableHistoryAction(privacy);
737736
const QString display_name = walletModel->getDisplayName();
738737
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
739738
}
@@ -769,6 +768,7 @@ void BitcoinGUI::setCurrentWallet(WalletModel* wallet_model)
769768
break;
770769
}
771770
}
771+
setWalletActionsEnabled(true);
772772
updateWindowTitle();
773773
m_migrate_wallet_action->setEnabled(wallet_model->wallet().isLegacy());
774774
}
@@ -805,6 +805,9 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
805805
m_close_wallet_action->setEnabled(enabled);
806806
m_close_all_wallets_action->setEnabled(enabled);
807807
m_migrate_wallet_action->setEnabled(enabled);
808+
#ifdef ENABLE_WALLET
809+
if (enabled) enableHistoryAction(isPrivacyModeActivated());
810+
#endif // ENABLE_WALLET
808811
}
809812

810813
void BitcoinGUI::createTrayIcon()

0 commit comments

Comments
 (0)