Skip to content

Commit 779c5f9

Browse files
committed
Qt: hide RPCConsole wallet selector when no wallets are present
1 parent dc6f150 commit 779c5f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/qt/rpcconsole.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,10 @@ RPCConsole::RPCConsole(const PlatformStyle *_platformStyle, QWidget *parent) :
478478
connect(ui->fontSmallerButton, SIGNAL(clicked()), this, SLOT(fontSmaller()));
479479
connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
480480

481+
// disable the wallet selector by default
482+
ui->WalletSelector->setVisible(false);
483+
ui->WalletSelectorLabel->setVisible(false);
484+
481485
// set library version labels
482486
#ifdef ENABLE_WALLET
483487
ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0));
@@ -697,6 +701,10 @@ void RPCConsole::addWallet(WalletModel * const walletModel)
697701
// First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
698702
ui->WalletSelector->setCurrentIndex(1);
699703
}
704+
if (ui->WalletSelector->count() > 2) {
705+
ui->WalletSelector->setVisible(true);
706+
ui->WalletSelectorLabel->setVisible(true);
707+
}
700708
}
701709
#endif
702710

0 commit comments

Comments
 (0)