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.77k stars 1.14k forks source link

Editing style with multiple instances of module loses instance #8610

Closed kofa73 closed 3 years ago

kofa73 commented 3 years ago

Describe the bug/issue lighttable -> styles -> edit -> update corrupts style if multiple instances are selected for update

To Reproduce

  1. Open an image
  2. Apply 2 instances of a module (I used contrast EQ / atrous with the built-in clarity and deblur: large blur, strength 3 presets). Name the instances (I used the names 'clarity' and 'deblur).
  3. From the history stack, create a style with the 2 module instances.
  4. In lighttable, export the preset to a dtstyle file.
  5. With the same image selected as the one from which the style was created, click edit in the lighttable's styles menu.
  6. Select the module instances to update the style. image
  7. Export the updated style.
  8. Edit the style again. It'll show the same module instance twice: image
  9. Apply the updated style to an image.

Expected behavior

  1. Exported files are identical (2 instances of the module with the same sets of settings)
  2. After-update version of the style is the same as the one original one.

My exported dtstyles before/after the update are at https://tech.kovacs-telekes.org/files/2021-04-04-style-with-multiple-instances-of-module/clarity-plus-deblur.zip

Might be related to #7581? Though, for me, creating the style works; it's the update that's broken.

Which commit introduced the error Went back to 3.4.1, the problem is present. Then to 3.0.2, still present. Maybe this never worked?

Platform

I just use the supplied build.sh without any magic.

Additional context

TurboGit commented 3 years ago

Point 6 is where the bug is as in 7 the dtstyle contains the same instance name.

TurboGit commented 3 years ago

Thanks for the report, should be fixed on master.

kofa73 commented 3 years ago

Confirmed: it is fixed, indeed. Thanks for the quick reaction.

TurboGit commented 3 years ago

Thanks for confirming !