Skip to content

Commit

Permalink
crop : ensure right params computation on focus out
Browse files Browse the repository at this point in the history
  • Loading branch information
AlicVB committed May 12, 2021
1 parent 15f539a commit 210e876
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/iop/clipping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ void gui_focus(struct dt_iop_module_t *self, gboolean in)
{
keystone_type_populate(self, FALSE, 0);
}
// weird hack : commit_box use distort_transform routines with gui values to get params
// hack : commit_box use distort_transform routines with gui values to get params
// but this values are accurate only if clipping is the gui_module...
// so we temporary put back gui_module to clipping and revert once finished
dt_iop_module_t *old_gui = self->dev->gui_module;
Expand Down
6 changes: 6 additions & 0 deletions src/iop/crop.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,13 @@ void gui_focus(struct dt_iop_module_t *self, gboolean in)
}
else
{
// hack : commit_box use distort_transform routines with gui values to get params
// but this values are accurate only if crop is the gui_module...
// so we temporary put back gui_module to crop and revert once finished
dt_iop_module_t *old_gui = self->dev->gui_module;
self->dev->gui_module = self;
_commit_box(self, g, p);
self->dev->gui_module = old_gui;
g->clip_max_pipe_hash = 0;
}
}
Expand Down

0 comments on commit 210e876

Please sign in to comment.