From 2c33c761708c0320006ba2b8a97ee4618a15840a Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sun, 10 Mar 2024 00:12:18 -0800 Subject: [PATCH] ButtonParamControl: use buttonClicked (#31817) old-commit-hash: d651bc802b540089acb4c3b9d5d984fb8b554487 --- selfdrive/ui/qt/widgets/controls.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/qt/widgets/controls.h b/selfdrive/ui/qt/widgets/controls.h index e4630c6590..f6e099ce50 100644 --- a/selfdrive/ui/qt/widgets/controls.h +++ b/selfdrive/ui/qt/widgets/controls.h @@ -223,10 +223,8 @@ public: button_group->addButton(button, i); } - QObject::connect(button_group, QOverload::of(&QButtonGroup::buttonToggled), [=](int id, bool checked) { - if (checked) { - params.put(key, std::to_string(id)); - } + QObject::connect(button_group, QOverload::of(&QButtonGroup::buttonClicked), [=](int id) { + params.put(key, std::to_string(id)); }); }