From dbee457c09649214fb2acfdf30373125b7a34a53 Mon Sep 17 00:00:00 2001 From: atse Date: Thu, 18 Jul 2024 15:51:19 +0800 Subject: [PATCH] i -> ch and others --- pytec/pytec/gui/view/ctrl_panel.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pytec/pytec/gui/view/ctrl_panel.py b/pytec/pytec/gui/view/ctrl_panel.py index 9ccbb05..9e04a55 100644 --- a/pytec/pytec/gui/view/ctrl_panel.py +++ b/pytec/pytec/gui/view/ctrl_panel.py @@ -75,16 +75,17 @@ class CtrlPanel(QObject): for ch in range(self.NUM_CHANNELS) ] - for i, tree in enumerate(self.trees_ui): + for ch, tree in enumerate(self.trees_ui): tree.setHeaderHidden(True) - tree.setParameters(self.params[i], showTop=False) - self.params[i].setValue = self._setValue - self.params[i].sigTreeStateChanged.connect(sigTreeStateChanged_handle) + tree.setParameters(self.params[ch], showTop=False) + self.params[ch].setValue = self._setValue + self.params[ch].sigTreeStateChanged.connect(sigTreeStateChanged_handle) set_tree_label_tips(tree) - for handle in sigActivated_handles[i]: - self.params[i].child(*handle[0]).sigActivated.connect(handle[1]) + for handle in sigActivated_handles[ch]: + self.params[ch].child(*handle[0]).sigActivated.connect(handle[1]) + def _setValue(self, value, blockSignal=None): """