darktable-org / darktable-org/darktable

Snapshot previews correctly but restores onto the wrong duplicate

Open
#22,018 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: image processing
Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Is there an existing issue for this?
  • I checked and did not find my issue in the already reported ones
Describe the bug

When a snapshot is made in an image which is subsequently duplicated, it can't be applied in the new image. Instead, it applies in the history stack of the old image.

Original report:

I saved a snapshot where the image looked purple. When I click the snapshot to preview it, the image successfully previews as purple. But when I click the arrow button to load the snapshot, the image does not show what was previewed. The color calibration parameters are not changed when I load the snapshot, whatever they are (even the enable/disable state). But the values sometimes change to something wrong. It seems to depend on the prior state of the image. (The snapshot is a color calibration snapshot, so it's definitely supposed to have a value for that module.)

Steps to reproduce
  • Open an image
  • Show the filmstrip
  • Apply a visually obvious change, like tinting it purple
  • Make a snapshot
  • Undo the obvious change
  • Make a duplicate
  • Apply the snapshot

Result: in the filmstrip, you can see the change is applied to the previous image. It is not applied to the current image.

Expected behavior

No response

Logfile | Screenshot | Screencast

https://github.com/user-attachments/assets/c565c0c9-b311-49c3-a1d6-fd73b233d9f2

Commit

Since before 5.2.0

Where did you obtain darktable from?

self compiled

darktable version

5.7.0+627~gb9bc759873-dirty

What OS are you using?

Windows

What is the version of your OS?

Windows 11

Describe your system

No response

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the listed filmstrip, snapshot, undo, and duplicate steps, then trace how snapshot application selects the image history. Confirm that applying a snapshot changes the current duplicate rather than the previous image, while preserving the prior image's history and visible state.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.