1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-12-30 18:51:19 +01:00

fix(image_roi_tree): changing color dialog from ColorButtonNative is open once

This commit is contained in:
2025-07-08 10:31:37 +02:00
committed by Jan Wyzula
parent c50ace5818
commit 244bca4e1e

View File

@@ -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__])