qt: Fix regression in "Encrypt Wallet" menu item

Adding a new item to the m_wallet_selector must follow the establishment
of signal-slot connections.
pull/826/head
Hennadii Stepanov 3 years ago
parent eaf09bda4a
commit d54d949598
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -682,8 +682,6 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
m_wallet_selector_label_action->setVisible(true); m_wallet_selector_label_action->setVisible(true);
m_wallet_selector_action->setVisible(true); m_wallet_selector_action->setVisible(true);
} }
const QString display_name = walletModel->getDisplayName();
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
connect(wallet_view, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay); connect(wallet_view, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay);
connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage); connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
@ -696,6 +694,8 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
connect(wallet_view, &WalletView::hdEnabledStatusChanged, this, &BitcoinGUI::updateWalletStatus); connect(wallet_view, &WalletView::hdEnabledStatusChanged, this, &BitcoinGUI::updateWalletStatus);
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy); connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
wallet_view->setPrivacy(isPrivacyModeActivated()); wallet_view->setPrivacy(isPrivacyModeActivated());
const QString display_name = walletModel->getDisplayName();
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
} }
void BitcoinGUI::removeWallet(WalletModel* walletModel) void BitcoinGUI::removeWallet(WalletModel* walletModel)

Loading…
Cancel
Save