Skip to content

Commit

Permalink
FIX(client): Prevent unchecking both ACL context checkboxes
Browse files Browse the repository at this point in the history
Previously, it was possible to have both context checkboxes
disabled in the ACLEditor, leaving the ACL entry in a dangleing
inactive state.
This commit makes sure, that at least one of the checkboxes is
always enabled.
  • Loading branch information
Hartmnt committed Sep 22, 2024
1 parent 7125750 commit c715a8c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/mumble/ACLEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,18 +827,26 @@ void ACLEditor::on_qcbACLInherit_clicked(bool) {

void ACLEditor::on_qcbACLApplyHere_clicked(bool checked) {
ChanACL *as = currentACL();
if (!as || as->bInherited)
if (!as || as->bInherited) {
return;
}

as->bApplyHere = checked;
if (!checked && !qcbACLApplySubs->isChecked()) {
qcbACLApplySubs->setCheckState(Qt::Checked);
}
}

void ACLEditor::on_qcbACLApplySubs_clicked(bool checked) {
ChanACL *as = currentACL();
if (!as || as->bInherited)
if (!as || as->bInherited) {
return;
}

as->bApplySubs = checked;
if (!checked && !qcbACLApplyHere->isChecked()) {
qcbACLApplyHere->setCheckState(Qt::Checked);
}
}

void ACLEditor::qcbACLGroup_focusLost() {
Expand Down

0 comments on commit c715a8c

Please sign in to comment.