Skip to content

Commit

Permalink
ashift : fix reuse of direct straigthening
Browse files Browse the repository at this point in the history
  • Loading branch information
AlicVB authored and TurboGit committed Nov 23, 2021
1 parent a4f794e commit e30ccdc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/iop/ashift.c
Original file line number Diff line number Diff line change
Expand Up @@ -4711,8 +4711,6 @@ int button_released(struct dt_iop_module_t *self, double x, double y, int which,
g->straightening = FALSE;
// adjust the line with possible current angle and flip on this module
float pts[4] = { x, y, g->lastx, g->lasty };
dt_dev_distort_backtransform_plus(self->dev, self->dev->preview_pipe, self->iop_order,
DT_DEV_TRANSFORM_DIR_FORW_INCL, pts, 2);

float dx = pts[0] - pts[2];
float dy = pts[1] - pts[3];
Expand All @@ -4736,6 +4734,7 @@ int button_released(struct dt_iop_module_t *self, double x, double y, int which,
if(a < -180.0) a += 360.0;
if(a > 180.0) a -= 360.0;

a -= dt_bauhaus_slider_get(g->rotation);
dt_bauhaus_slider_set_soft(g->rotation, -a);
return TRUE;
}
Expand Down

0 comments on commit e30ccdc

Please sign in to comment.