darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.69k stars 1.14k forks source link

unable to delete image previously used as overlay #17218

Closed robyquin closed 1 week ago

robyquin commented 2 months ago

Describe the bug

I cannot delete an image because it is used as an overlay: this is not true.

Table "overlay" doesn't update if Composite Module is removed directly from History Module.

003-003_1109x827

Steps to reproduce

  1. In DarkRoom View I add Composite module at tower image
  2. I select moon image and drag it into the appropriate area
  3. In history module I select item preceding at "composite" item
  4. I press button "Compress history stack"
  5. In lighttable, I try to delete moon image, but it isn't possible

I add composite module (item 13)

003-001_1109x827

I select item 12 and I compress history stack

003-002_1109x827

unable to delete image moon

003-003_1109x827

Expected behavior

The same behavior as when I reset the module composite

Logfile | Screenshot | Screencast

log.txt

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

darktable 4.8.1

What OS are you using?

Windows

What is the version of your OS?

Windows 10

Describe your system?

No response

Are you using OpenCL GPU in darktable?

None

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

jenshannoschwalm commented 2 months ago

What happens if you compress history of the image that had the overlay before changing that again? If that 'solves' your issue it wouldn't be a bug at all...

robyquin commented 2 months ago

I don't think I understood your question well!

The problem is that if I modify the history in the way described, I delete, voluntarily or involuntarily, item relating to the "composite" operation, but the relationship remains in the database.

now if I add a new composite operation with a different image, a new record is added to the database, but the previous one is not modified or deleted.

In this way in the database there are 2 relations for the same image, one true, the other not.

These relationships block the deletion of image, which in one case is correct, in the other not.

jenshannoschwalm commented 2 months ago

I tested and was on the wrong track. In fact you have to remove the unused composite module instance before you can remove the image-in-question. I think this behaviour is correct as there is still some history entry that could be enabled again with the same composited image. So no bug for me.

robyquin commented 2 months ago

I don't know if it's a bug or not.

The fact is that, while I was experimenting the composite module, then I found many images in my library that I couldn't delete for described reason.

From this situation, how can I unlock and delete image file (overlayed)?

  1. In DarkRoom View I add Composite module at tower image
  2. I select moon image and drag it into the appropriate area
  3. In history module I select item preceding at "composite" item
  4. I press button "Compress history stack"

For me this is equivalent to a composite module reset

jenshannoschwalm commented 2 months ago

A standard feature of darktable is: you can always select any step in the history and should see as if your development was exactly at that stage. So - it would be undeserved to find an overlay image not available any more.

robyquin commented 2 months ago

I think what you say is correct, if you used "history stack" to display before and after of an operation.

But I try to say what is shown in this screenshot (post compression history stack): composite operation no longer exists in the development history. Why should it continue to exist in the database?


I attach xmp files and screenshot of table overlay

tower.NEF.xmp.zip moon.NEF.xmp.zip

immagine

github-actions[bot] commented 2 weeks ago

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

kofa73 commented 1 week ago

If I compress the stack, and composite no longer appears in it, the entry in the DB table library:overlay still remains, and the image cannot be removed.

TurboGit commented 1 week ago

I'll look at this.

TurboGit commented 1 week ago

@robyquin @kofa73 : See #17620