From 2ae07107a2a119dd02f9612cc4c58d1383bf6228 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 16 Jul 2024 11:29:41 +0800 Subject: [PATCH] Expand PID Settings on PID engage --- pytec/pytec/gui/view/ctrl_panel.py | 7 +++++++ pytec/pytec/gui/view/param_tree.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pytec/pytec/gui/view/ctrl_panel.py b/pytec/pytec/gui/view/ctrl_panel.py index b747d1b..2bac57d 100644 --- a/pytec/pytec/gui/view/ctrl_panel.py +++ b/pytec/pytec/gui/view/ctrl_panel.py @@ -127,6 +127,13 @@ class CtrlPanel(QObject): for handle in sigActivated_handles[i]: self.params[i].child(*handle[0]).sigActivated.connect(handle[1]) + self.params[i].child("output", "i_set").sigAutoChanged.connect( + lambda param, auto: param.parent() + .parent() + .child("pid") + .setOpts(expanded=auto) + ) + def _setValue(self, value, blockSignal=None): """ Implement 'lock' mechanism for Parameter Type diff --git a/pytec/pytec/gui/view/param_tree.json b/pytec/pytec/gui/view/param_tree.json index cd48413..fe791da 100644 --- a/pytec/pytec/gui/view/param_tree.json +++ b/pytec/pytec/gui/view/param_tree.json @@ -207,7 +207,7 @@ { "name":"pid", "title":"PID Settings", - "expanded":true, + "expanded":false, "type":"group", "tip": "", "children":[