From 244bca4e1ec7c00109534b9f503ff2eb125c1ffe Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 8 Jul 2025 10:31:37 +0200 Subject: [PATCH] fix(image_roi_tree): changing color dialog from ColorButtonNative is open once --- .../widgets/plots/image/setting_widgets/image_roi_tree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bec_widgets/widgets/plots/image/setting_widgets/image_roi_tree.py b/bec_widgets/widgets/plots/image/setting_widgets/image_roi_tree.py index ace193e2..174d2c1d 100644 --- a/bec_widgets/widgets/plots/image/setting_widgets/image_roi_tree.py +++ b/bec_widgets/widgets/plots/image/setting_widgets/image_roi_tree.py @@ -363,7 +363,9 @@ class ROIPropertyTree(BECWidget, QWidget): # color button color_btn = ColorButtonNative(parent=self, color=roi.line_color) self.tree.setItemWidget(parent, self.COL_PROPS, color_btn) - color_btn.clicked.connect(lambda: self._pick_color(roi, color_btn)) + color_btn.color_changed.connect( + lambda new_color, r=roi: setattr(r, "line_color", new_color) + ) # child rows (3 columns: action, ROI, properties) QTreeWidgetItem(parent, ["", "Type", roi.__class__.__name__])