fix issue when disabling the auto-enabled blank wallet checkbox#243
Merged
maflcko merged 1 commit intobitcoin-core:masterfrom Mar 26, 2021
Merged
fix issue when disabling the auto-enabled blank wallet checkbox#243maflcko merged 1 commit intobitcoin-core:masterfrom
maflcko merged 1 commit intobitcoin-core:masterfrom
Conversation
Talkless
reviewed
Mar 11, 2021
src/qt/createwalletdialog.cpp
Outdated
| }); | ||
|
|
||
| connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [this](bool checked) { | ||
| // Disable the disable_privkeys_checkbox when blank_wallet_checkbox is false |
There was a problem hiding this comment.
Not sure if these kind of comments are helpful. You can see that stated fact by just looking at rather self-explanatory code, with descriptive variable names.
Maybe this message would be more informative:
//Having "Disable Private Keys" checked after unchecking "Make Blank Wallet" makes no sense. Disabling keys means wallet has to be blank.
Or something similar.
Member
There was a problem hiding this comment.
Actually, the comment is wrong as the disable_privkeys_checkbox is to be unchecked, not disabled :)
I think just removing it is fine.
leonardojobim
approved these changes
Mar 12, 2021
leonardojobim
left a comment
There was a problem hiding this comment.
Tested ACK ca6bb0d on Ubuntu 20.04
Contributor
Member
|
Concept ACK. The logic of checkboxes interaction is correct. |
This commit makes it so that when the `Blank Wallet` checkbox is auto-selected after the user selects 'Disable Private' keys, unselecting it will also unselect the 'Disable Private Keys' checkbox, which in turn re-enables the 'Encrypt Wallet' checkbox.
Contributor
Author
hebasto
approved these changes
Mar 23, 2021
Talkless
approved these changes
Mar 23, 2021
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Mar 26, 2021
… blank wallet checkbox 915e341 qt: fix issue when disabling the auto-enabled blank wallet checkbox (Jarol Rodriguez) Pull request description: As detailed by #151, On `master` a user can create the confusing scenario where you have a disabled `Encrypt Wallet` checkbox and a selected `Disable Private Keys` checkbox after unselecting the auto-enabled `Blank Wallet` checkbox. This commit makes it so that when the `Blank Wallet` checkbox is auto-selected after the user selects `Disable Private keys`, unselecting it will also unselect the `Disable Private Keys` checkbox, which in turn re-enables the `Encrypt Wallet` checkbox. Below are screenshots comparing the behavior of selecting `Disable Private Keys` then unselecting the `Blank Wallet` between `master` and this `PR`: **Master:** | Select `Disable Private Keys` | Unselect `Blank Wallet` | | ----------------------------- | ------------------------ | |  |  | **PR:** | Select `Disable Private Keys` | Unselect `Blank Wallet` | | ----------------------------- | ------------------------ | |  |  | ACKs for top commit: hebasto: ACK 915e341 Talkless: ACK 915e341 Tree-SHA512: ce6ecbc35b94a08cabf0b8a24dbdfc874d82cc8918cc8623dce8172c7fc9c75d63a13b036bae5f7ab2c090f8d020574a542285d1651600813faf5d91e2506a8d
gwillen
pushed a commit
to ElementsProject/elements
that referenced
this pull request
Jun 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

As detailed by #151, On
mastera user can create the confusing scenario where you have a disabledEncrypt Walletcheckbox and a selectedDisable Private Keyscheckbox after unselecting the auto-enabledBlank Walletcheckbox.This commit makes it so that when the
Blank Walletcheckbox is auto-selected after the user selectsDisable Private keys, unselecting it will also unselect theDisable Private Keyscheckbox, which in turn re-enables theEncrypt Walletcheckbox.Below are screenshots comparing the behavior of selecting
Disable Private Keysthen unselecting theBlank Walletbetweenmasterand thisPR:Master:
Disable Private KeysBlank WalletPR:
Disable Private KeysBlank Wallet