diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-03-18 15:35:51 +0700 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-03-26 18:40:27 +0700 |
commit | 779c5f984064cfc48304b78da664de13fc3d9bb4 (patch) | |
tree | a73cadc09985d839d0dabfe42fe397fdc48427c6 /src/qt/rpcconsole.cpp | |
parent | dc6f150f350f9c669d1c33e20afd0fdbb7fcf047 (diff) |
Qt: hide RPCConsole wallet selector when no wallets are present
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r-- | src/qt/rpcconsole.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 29b8c4d03a..c41e19f6f5 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -478,6 +478,10 @@ RPCConsole::RPCConsole(const PlatformStyle *_platformStyle, QWidget *parent) : connect(ui->fontSmallerButton, SIGNAL(clicked()), this, SLOT(fontSmaller())); connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear())); + // disable the wallet selector by default + ui->WalletSelector->setVisible(false); + ui->WalletSelectorLabel->setVisible(false); + // set library version labels #ifdef ENABLE_WALLET ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0)); @@ -697,6 +701,10 @@ void RPCConsole::addWallet(WalletModel * const walletModel) // First wallet added, set to default so long as the window isn't presently visible (and potentially in use) ui->WalletSelector->setCurrentIndex(1); } + if (ui->WalletSelector->count() > 2) { + ui->WalletSelector->setVisible(true); + ui->WalletSelectorLabel->setVisible(true); + } } #endif |