aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-08-03 12:25:34 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-08-03 12:25:34 +0300
commit20c9e035543892e322c7134e89eb33115678bb30 (patch)
tree71c3e2723b9e6c403cbe5ad5e1560626bd2fd325 /src/qt/bitcoingui.cpp
parenta78742830aa35bf57bcb0a4730977a1e5a1876bc (diff)
downloadbitcoin-20c9e035543892e322c7134e89eb33115678bb30.tar.xz
gui: Call setWalletActionsEnabled(true) only for the first wallet
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index ebcc04a5eb..b95a1df196 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -664,14 +664,15 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
{
if (!walletFrame) return;
if (!walletFrame->addWallet(walletModel)) return;
- const QString display_name = walletModel->getDisplayName();
- setWalletActionsEnabled(true);
rpcConsole->addWallet(walletModel);
- m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
- if (m_wallet_selector->count() == 2) {
+ if (m_wallet_selector->count() == 0) {
+ setWalletActionsEnabled(true);
+ } else if (m_wallet_selector->count() == 1) {
m_wallet_selector_label_action->setVisible(true);
m_wallet_selector_action->setVisible(true);
}
+ const QString display_name = walletModel->getDisplayName();
+ m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
}
void BitcoinGUI::removeWallet(WalletModel* walletModel)