From 6e7afd0e5a38359b4c088ccd3082cbaa639cbf2b Mon Sep 17 00:00:00 2001 From: Hartmnt Date: Thu, 18 Jul 2024 10:48:04 +0000 Subject: [PATCH] FIX(client): Prevent unchecking both ACL context checkboxes 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. --- src/mumble/ACLEditor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mumble/ACLEditor.cpp b/src/mumble/ACLEditor.cpp index 7d990e047cc..9107f994db6 100644 --- a/src/mumble/ACLEditor.cpp +++ b/src/mumble/ACLEditor.cpp @@ -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() {