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.

(cherry picked from commit 55b4de0)
  • Loading branch information
Hartmnt committed Jan 2, 2025
1 parent 37eb695 commit dcd739d
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 dcd739d

Please sign in to comment.