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.
achow101
commented at 10:40 pm on August 3, 2021:
member
ACKd54d94959869b0c363939163b99ba0475751dcb6
Tested that this fixes the issue.
For those wondering why this fixes the issue, m_wallet_selector->addItem ends up calling a lot of setup functions and emits several signals. One of those signals is encryptionStatusChanged. However previously this signal was not connected to its slot so when that signal was emitted, it did not have the intended effect of greying out the Encrypt Wallet option. By moving addItem to after all of the signals have been connected, the signal will be correctly handled.
hebasto added the label
Wallet
on Aug 4, 2021
jarolrod
commented at 6:42 am on August 5, 2021:
member
ACKd54d94959869b0c363939163b99ba0475751dcb6
Tested on macOS 12 and Ubuntu 20.4.02
The related code is a bit entangled, but I have ensured that this is correct in its implementation and is a good way to fix the issue. Below are screenshots comparing master and this PR:
Master.
PR.
This was tested by starting with an already encrypted wallet. On the master branch, we can notice the issue described in #392. On the PR branch, we can see that this is fixed.
hebasto merged this
on Aug 5, 2021
hebasto closed this
on Aug 5, 2021
hebasto deleted the branch
on Aug 5, 2021
hebasto referenced this in commit
98369d8519
on Aug 5, 2021
hebasto
commented at 7:01 am on August 5, 2021:
member
This is a metadata mirror of the GitHub repository
bitcoin-core/gui.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:20 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me