File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,28 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
3535 }
3636 });
3737
38- #ifndef USE_SQLITE
39- ui->descriptor_checkbox ->setToolTip (tr (" Compiled without sqlite support (required for descriptor wallets)" ));
40- ui->descriptor_checkbox ->setEnabled (false );
41- ui->descriptor_checkbox ->setChecked (false );
42- #endif
38+ connect (ui->disable_privkeys_checkbox , &QCheckBox::toggled, [this ](bool checked) {
39+ // Disable the encrypt_wallet_checkbox when isDisablePrivateKeysChecked is
40+ // set to true, enable it when isDisablePrivateKeysChecked is false.
41+ ui->encrypt_wallet_checkbox ->setEnabled (!checked);
42+
43+ // Wallets without private keys start out blank
44+ if (checked) {
45+ ui->blank_wallet_checkbox ->setChecked (true );
46+ }
47+
48+ // When the encrypt_wallet_checkbox is disabled, uncheck it.
49+ if (!ui->encrypt_wallet_checkbox ->isEnabled ()) {
50+ ui->encrypt_wallet_checkbox ->setChecked (false );
51+ }
52+ });
53+
54+ #ifndef USE_SQLITE
55+ ui->descriptor_checkbox ->setToolTip (tr (" Compiled without sqlite support (required for descriptor wallets)" ));
56+ ui->descriptor_checkbox ->setEnabled (false );
57+ ui->descriptor_checkbox ->setChecked (false );
58+ #endif
59+
4360}
4461
4562CreateWalletDialog::~CreateWalletDialog ()
Original file line number Diff line number Diff line change 6868 <string >Encrypt Wallet</string >
6969 </property >
7070 <property name =" checked" >
71- <bool >true </bool >
71+ <bool >false </bool >
7272 </property >
7373 </widget >
7474 <widget class =" QCheckBox" name =" disable_privkeys_checkbox" >
7575 <property name =" enabled" >
76- <bool >false </bool >
76+ <bool >true </bool >
7777 </property >
7878 <property name =" geometry" >
7979 <rect >
You can’t perform that action at this time.
0 commit comments