mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-14 20:20:43 +02:00
Qt: hide RPCConsole wallet selector when no wallets are present
This commit is contained in:
parent
dc6f150f35
commit
779c5f9840
@ -478,6 +478,10 @@ RPCConsole::RPCConsole(const PlatformStyle *_platformStyle, QWidget *parent) :
|
|||||||
connect(ui->fontSmallerButton, SIGNAL(clicked()), this, SLOT(fontSmaller()));
|
connect(ui->fontSmallerButton, SIGNAL(clicked()), this, SLOT(fontSmaller()));
|
||||||
connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
|
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
|
// set library version labels
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0));
|
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)
|
// First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
|
||||||
ui->WalletSelector->setCurrentIndex(1);
|
ui->WalletSelector->setCurrentIndex(1);
|
||||||
}
|
}
|
||||||
|
if (ui->WalletSelector->count() > 2) {
|
||||||
|
ui->WalletSelector->setVisible(true);
|
||||||
|
ui->WalletSelectorLabel->setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user