Skip to content

Commit 77637e4

Browse files
fix: avoid ROI to reappear after complete suppression
1 parent dcae828 commit 77637e4

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

datalab/gui/processor/base.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,13 @@ def auto_recompute_analysis(
989989
# Get the parameter from processing parameters
990990
param = proc_params.param
991991

992+
# Disable ROI creation during auto-recompute: detection functions store
993+
# create_rois=True in their parameters, but auto-recompute should only
994+
# update analysis results, not recreate ROIs (which would make them
995+
# impossible to delete or modify).
996+
if hasattr(param, "create_rois"):
997+
param.create_rois = False
998+
992999
# Get the actual function from the function name
9931000
feature = self.get_feature(proc_params.func_name)
9941001

@@ -1445,12 +1452,6 @@ def compute_1_to_0(
14451452
# Apply processor-specific post-processing on the result
14461453
refresh_needed |= self.postprocess_1_to_0_result(obj, result)
14471454

1448-
# If post-processing created ROIs (e.g., contour detection),
1449-
# disable ROI creation in the stored parameters to prevent
1450-
# re-creation during auto-recompute on ROI change.
1451-
if refresh_needed and hasattr(param, "create_rois"):
1452-
param.create_rois = False
1453-
14541455
# Append result to result data for later display
14551456
rdata.append(adapter, obj)
14561457

0 commit comments

Comments
 (0)