Skip to content

Commit e9472e6

Browse files
committed
Merge bitcoin-core/gui#393: Fix regression in "Encrypt Wallet" menu item
d54d949 qt: Fix regression in "Encrypt Wallet" menu item (Hennadii Stepanov) Pull request description: Fix bitcoin#392. Adding a new item to the `m_wallet_selector` must follow the establishment of a connection between the `WalletView::encryptionStatusChanged` signal and the `BitcoinGUI::updateWalletStatus` slot. This was a regression introduced in bitcoin@20e2e24 (bitpay#29). --- An _encrypted_ wallet being auto-loaded at the GUI startup: - on master (eaf09bd) ![Screenshot from 2021-08-03 22-38-49](https://user-images.githubusercontent.com/32963518/128075837-cdbb2047-5327-43ea-b2d5-2dcdef67cdc0.png) - with this PR ![Screenshot from 2021-08-03 22-34-58](https://user-images.githubusercontent.com/32963518/128075572-cb727652-ad44-4b85-bf64-edcd19f9dea1.png) ACKs for top commit: achow101: ACK d54d949 jarolrod: ACK d54d949 Tree-SHA512: 669615ec8e1517c2f4cdf59bd11a7c85be793ba0dda112361cf95e6c2f0636215fed331d26a86dc9b779a49defae1b248232f98dab449584376c111c288e87bb
2 parents be37037 + d54d949 commit e9472e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/bitcoingui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,6 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
682682
m_wallet_selector_label_action->setVisible(true);
683683
m_wallet_selector_action->setVisible(true);
684684
}
685-
const QString display_name = walletModel->getDisplayName();
686-
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
687685

688686
connect(wallet_view, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay);
689687
connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
@@ -696,6 +694,8 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
696694
connect(wallet_view, &WalletView::hdEnabledStatusChanged, this, &BitcoinGUI::updateWalletStatus);
697695
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
698696
wallet_view->setPrivacy(isPrivacyModeActivated());
697+
const QString display_name = walletModel->getDisplayName();
698+
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
699699
}
700700

701701
void BitcoinGUI::removeWallet(WalletModel* walletModel)

0 commit comments

Comments
 (0)