Skip to content

Commit c257b0d

Browse files
committed
Merge d67883d into merged_master (Bitcoin PR bitcoin-core/gui#43)
2 parents 6682a29 + d67883d commit c257b0d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/qt/bitcoingui.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -664,14 +664,15 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
664664
{
665665
if (!walletFrame) return;
666666
if (!walletFrame->addWallet(walletModel)) return;
667-
const QString display_name = walletModel->getDisplayName();
668-
setWalletActionsEnabled(true);
669667
rpcConsole->addWallet(walletModel);
670-
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
671-
if (m_wallet_selector->count() == 2) {
668+
if (m_wallet_selector->count() == 0) {
669+
setWalletActionsEnabled(true);
670+
} else if (m_wallet_selector->count() == 1) {
672671
m_wallet_selector_label_action->setVisible(true);
673672
m_wallet_selector_action->setVisible(true);
674673
}
674+
const QString display_name = walletModel->getDisplayName();
675+
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
675676
}
676677

677678
void BitcoinGUI::removeWallet(WalletModel* walletModel)

0 commit comments

Comments
 (0)