Modules in styles are being applied in reverse order

In order to denoise an image the denoise(profiled) module is applied twice: first denoising color and then denoising lightness. The order of execution is important.

When I afterwards create a style based on this history stack, DT copies the stack as it is, but the style is applied from top to bottom thus reversing the order of execution.

Original history stack:
original%20stack

Style creation:
style

Resulting history stack when the style is applied to a new image:
resultat

Not a big issue as the history order does not change the order in which the modules are applied anyway.

As Pascal says above, the history stack is just a list of the modules applied, it is not the ordered list of the applied modules.

The order of the applied modules can be seen on the right side of the interface.
Look here for more details.

Thank you for your response.
So applying the same module twice by means of a style produces the correct result even though the history stack for some reason reflects the modules in reverse order.
I think it’s a bit confusing to new users of DT…….:o)!

Should I delete the post?

No, you can leave the post.

Just read the link I provided, it will clarify all. As for the history stack, if you do not like duplicates there, you can always click ‘Compress history stack’, Darktable will put together everything nice and tidy. It is useful when you want to create a style from the history stack.

I’m sorry, but “compress history stack” doesn’t compress “denoise (profiled)” and “denoise (profiled) 1” into one denoise entry.

Nor should it, as they might well be different parameters.

No, It will not compress the modules you apply with different settings.
Yes, it will compress modules when you edit something in ‘module 1’ then do other edits in other modules, than you edit again the options for ‘module 1’. in this case after compressing you get only one ‘module 1’

Thank you for all responses and explanations.
It seems to me that the result of this long discussion is as follows.
The DT user manual states that “The history stack records your workflow in the order in which you made changes to the pipeline”.

But this is actually not quite true. If you apply a style using several modules, the modules will be shown in the history stack in reverse order ( but the resulting image will be correct).