Skip to content

Commit

Permalink
Avoid collapsing of module header
Browse files Browse the repository at this point in the history
As reported and shortly discussed in darktable-org#18151 a click on the modules reset-parameters button collapses
the module if `darkroom/ui/hide_header_buttons=active` (since 3.8).

We don't have to reset the headerbar buttons to a safe state in 'dt_iop_gui_update()' but only when loading
a new image into darkroom as the modules applicable status might have changed (for example modules that
only work with raw image data).
  • Loading branch information
jenshannoschwalm committed Jan 7, 2025
1 parent 1f05650 commit fe03c3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/develop/imageop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,6 @@ void dt_iop_gui_update(dt_iop_module_t *module)
dt_iop_gui_update_expanded(module);
}
dt_iop_gui_update_header(module);
dt_iop_show_hide_header_buttons(module, NULL, FALSE, FALSE);
dt_guides_update_module_widget(module);

// this signal must be raised only safely when the darkroom and history
Expand Down
4 changes: 3 additions & 1 deletion src/views/darkroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ static gboolean _dev_load_requested_image(gpointer user_data)
{
dt_iop_gui_init(module);

/* add module to right panel */
/* add module to right panel with safe header buttons */
dt_iop_gui_set_expander(module);
dt_iop_gui_update_blending(module);
}
Expand All @@ -1134,6 +1134,8 @@ static gboolean _dev_load_requested_image(gpointer user_data)
// update the module header to ensure proper multi-name display
if(!dt_iop_is_hidden(module))
{
// Make sure module header buttons are reset to a safe state
dt_iop_show_hide_header_buttons(module, NULL, FALSE, FALSE);
snprintf(option, sizeof(option), "plugins/darkroom/%s/expanded", module->op);
module->expanded = dt_conf_get_bool(option);
dt_iop_gui_update_expanded(module);
Expand Down

0 comments on commit fe03c3b

Please sign in to comment.