Bug #11586

Clone a module go to favorite modules

Added by Christian iuga over 2 years ago. Updated over 2 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
hardware architecture:


to reproduce the issue :
- Add a module into favorite (like shadow & higlight)
- Go into basic group
- Enable & tune the shadow & higligh module

Then when i duplicate this modules, the group change from basic to favorite

it's not a critical bug but it's strange & unexpected and it's also create a side effect :

if in favorite module, a module was expended before create the duplicate, i can see 2 modules expanded even with the option "expand a single darkroom module at a time" enable...

Associated revisions

Revision 98ab06a7 (diff)
Added by Peter Budai over 2 years ago

Duplicating a favorite module won't go to favorite module group automatically.
Fixes #11586


#1 Updated by Tobias Ellinghaus over 2 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Triaged

I won't have time to fix this myself. If anyone wants to give it a try, here is what's happening:

dt_dev_module_duplicate() calls dt_iop_load_module() which eventually calls dt_iop_load_module_by_so(). That function then calls dt_iop_gui_set_state() which is responsible for the tab changing. The quick hack would be to pass a flag down that call chain to not switch the module group. The better solution would be to think about why tab changing is part of module loading at all and maybe move that out of there – at the cost of making sure it's correctly called in all places where it's needed and not forgotten in the future.

#2 Updated by Peter Budai over 2 years ago

I have looked into this, and found the following:
If in the modules list you click on a module the following happens:
  • 1st click: it will find the module for you, shows the appropriate module group and expands the module's setting
  • 2nd click: the module will get the favourite tag and the star will be displayed next to it, and the module group will switch to favourites
  • 3rd click: the favourite tag will be removed, and module group stays in the favourite
  • 4th click: the same as 1st click, cycle repeats

The line which always switches the modulegroup to favourites when a favoruite module is being added is here:

if you remove that line the following changes will happen:
  • on the 2nd click above, the module group won't change to favoutites. Actually I find it OK not to change module group to favourite when I mark a module as favourite.
  • duplicating a favourite module won't change module group, so that fixes this error

Any thoughts?

#3 Updated by Tobias Ellinghaus over 2 years ago

In order to keep the old behaviour we could do the switch to the favourites group in the calling code so that it only happens when marking a module as favourite.

#4 Updated by Peter Budai over 2 years ago

OK, I'll make a PR

#5 Updated by Peter Budai over 2 years ago

  • % Done changed from 20 to 100
  • Status changed from Triaged to Fixed

#6 Updated by Roman Lebedev over 2 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF

Go to top