Describe the bug
In the Analysis > Intensity profiles menu, the "Reset selection" button does not properly clear the previous selection. After resetting and drawing a new region, the resulting profile still corresponds to the first selection rather than the newly drawn one.
To Reproduce
- Create one or more Gaussian images using the Create menu
- Open Analysis > Intensity profiles > Average profile... (or Line/Segment profile)
- Draw a selection zone on the image and click OK — a signal is created in the Signal panel with the correct profile
- Re-open Analysis > Intensity profiles > Average profile...
- Click Reset selection
- Draw a different selection zone on the image
- Click OK
Result: The profile created in the Signal panel corresponds to the first selection (step 3), not the newly drawn zone (step 6).
Expected behavior
After clicking "Reset selection" and drawing a new zone, the extracted profile should correspond to the new selection. The old selection parameters should be fully discarded.
Screenshots
No screenshots provided.
Installation information
- Reported by external user
- Observed on standard DataLab installation
Additional context
- Affected component: DataLab (profiledialog.py —
ProfileExtractionDialog.reset_to_initial)
- Likely root cause: In
reset_to_initial(), self.shape is deleted from the plot but the reference is not set to None. When __tool_job_finished fires after the new selection, get_last_final_shape() may return a stale reference, or the old shape coordinates persist in self.param through shape_to_param().
Describe the bug
In the Analysis > Intensity profiles menu, the "Reset selection" button does not properly clear the previous selection. After resetting and drawing a new region, the resulting profile still corresponds to the first selection rather than the newly drawn one.
To Reproduce
Result: The profile created in the Signal panel corresponds to the first selection (step 3), not the newly drawn zone (step 6).
Expected behavior
After clicking "Reset selection" and drawing a new zone, the extracted profile should correspond to the new selection. The old selection parameters should be fully discarded.
Screenshots
No screenshots provided.
Installation information
Additional context
ProfileExtractionDialog.reset_to_initial)reset_to_initial(),self.shapeis deleted from the plot but the reference is not set toNone. When__tool_job_finishedfires after the new selection,get_last_final_shape()may return a stale reference, or the old shape coordinates persist inself.paramthroughshape_to_param().