Skip to content

Commit

Permalink
Merge #5894: backport: partial Merge bitcoin-core/gui#96: Slight impr…
Browse files Browse the repository at this point in the history
…ove create wallet dialog

a50f20d backport: partial Merge bitcoin-core/gui#96: Slight improve create wallet dialog (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  It fixes strange behaviour of enable/disable checkboxes and checking/unchecking them

  kudos to thephez to found an issue.

  ## What was done?
  Partial backport bitcoin-core/gui#96

  ## How Has This Been Tested?
  Build & run `dash-qt`

  ## Breaking Changes
  No actual code changed for creating wallet, only UI for it

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: 7b16d33af181e44ef5b77dbb0eabb3a435e5f0b3c0a5a5c4ce17c95bb5949a5a41d605f7e6100d0f994b50edf087b777cbed6fe6d29952c2446ac9f8229f1a3a
  • Loading branch information
PastaPastaPasta committed Feb 24, 2024
2 parents d64ec8b + a50f20d commit 3fd913a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/qt/createwalletdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
ui->disable_privkeys_checkbox->setChecked(false);
}
});
connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [this](bool checked) {
// Disable the encrypt_wallet_checkbox when isDisablePrivateKeysChecked is
// set to true, enable it when isDisablePrivateKeysChecked is false.
ui->encrypt_wallet_checkbox->setEnabled(!checked);

// Wallets without private keys start out blank
if (checked) {
ui->blank_wallet_checkbox->setChecked(true);
}

// When the encrypt_wallet_checkbox is disabled, uncheck it.
if (!ui->encrypt_wallet_checkbox->isEnabled()) {
ui->encrypt_wallet_checkbox->setChecked(false);
}
});
}

CreateWalletDialog::~CreateWalletDialog()
Expand Down

0 comments on commit 3fd913a

Please sign in to comment.