Git master : Noise reduction not executed if undo redo is cycled
Siril version: Git master 3c344c6a.
Operating System: Linux Debian 12.5.
Package: Compiled from source.
Description of the bug
If I do a first noise reduction (apply) followed by a second noise reduction (apply) then both noise reductions are executed. This is visible in main window and works as expected. However if I instead do first noise reduction (apply), followed by main window undo and redo, then a second noise reduction (apply) is not executed.
If I checkout tag 1.2.1 everything works as expected.
The bisection results is available as additional information below. This issue follow the same pattern as closed issue in #1276 (closed) for deconvolution and git bisect points to same commit 9072425f.
I wonder, but I do not know, if more functions besides noise reduction are affected, in the same way as deconvolution was. Is this is systematic in such a way that commit 9072425f affects yet other functions?
[I messed up description of old bug, #1276 (closed), since I accidentally edited description. I have tried to revert to old description].
Reproduction
Reproduction steps:
- Open fits image. Apply auto-stretch for better visibility in main window.
- Select image processing -> noise reduction (I pick defaults) and press apply. Keep noise reduction window open.
- Go to main window and press undo (noise reduction). Main window shows that noise reduction is undone, picture revert to before state.
- Go to main window and press redo (noise reduction). Main window shows that noise reduction is redone, picture is noise reduced again.
- Go back to noise reduction window and press apply again. Console states: NL-Bayes denoise (mod=1.000, CC enabled), NL-Bayes auto parametrisation: measured background noise level is "noise value", NL-Bayes output: measured background noise level is "noise value".
- Main window shows no visible impact from this noise reduction step.
Expected result: Main window should show noise reduced a second time.
Actual result: Main window shows no visible impact from second noise reduction step (step 5 above).
Additional information
Git bisect gives me this:
9072425f6e4248e256416e7df150c0d319ebc944 is the first bad commit
commit 9072425f6e4248e256416e7df150c0d319ebc944
Author: Adrian Knagg-Baugh <aje.baugh@gmail.com>
Date: Fri Sep 29 22:40:59 2023 +0000
Add ROI processing and reinstate histogram dialog preview toggle (fixes #1098 and #1188)
ChangeLog | 1 +
NEWS | 1 +
src/algos/geometry.c | 11 +-
src/core/command.c | 139 +++++++-----------
src/core/command_line_processor.c | 11 +-
src/core/command_line_processor.h | 48 +++---
src/core/settings.c | 6 +-
src/core/settings.h | 7 +
src/core/siril.h | 9 ++
src/core/siril_actions.c | 8 +
src/core/siril_actions.h | 3 +-
src/core/undo.c | 8 +
src/filters/asinh.c | 54 ++++---
src/filters/asinh.h | 1 +
src/filters/deconvolution/deconvolution.h | 1 +
src/filters/median.c | 38 ++++-
src/filters/median.h | 2 +
src/filters/nlbayes/call_nlbayes.h | 1 +
src/filters/saturation.c | 65 ++++++--
src/filters/saturation.h | 3 +-
src/filters/scnr.c | 59 +++++++-
src/filters/scnr.h | 1 +
src/gui/background_extraction.c | 5 +-
src/gui/callbacks.c | 153 ++++++++++++++++++-
src/gui/callbacks.h | 10 ++
src/gui/denoisegui.c | 71 +++------
src/gui/histogram.c | 179 +++++++++++++++-------
src/gui/histogram.h | 1 +
src/gui/image_display.c | 56 +++++++
src/gui/image_display.h | 2 +
src/gui/image_interactions.c | 1 +
src/gui/newdeconv.c | 67 +++++++--
src/gui/preferences.c | 6 +-
src/gui/siril-window.c | 9 +-
src/gui/siril3.glade | 236 +++++++++++++++++++++++++++---
src/gui/siril_preview.c | 35 ++++-
src/gui/siril_preview.h | 2 +
src/io/sequence.c | 1 +
src/io/single_image.c | 2 +-
39 files changed, 1006 insertions(+), 307 deletions(-)