diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-12-17 19:58:25 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-12-17 19:58:25 +0100 |
commit | 4cb46f4de4b881e5b1f65af017dca6f3917e55e5 (patch) | |
tree | fb359e210d2d9c30f5ad36a447ea29b62ae9bb56 /src/editing_tools | |
parent | 841f952294b349b2b8e2afb5305ce34a3b59bb4b (diff) | |
parent | f5a0cee8ccecc7b6c6c2d8e9fb6f6eecd53531fe (diff) |
Update upstream source from tag 'upstream/0.32.4'
Update to upstream version '0.32.4'
with Debian dir 51798a6af1c9b7e48f979c020d72f3c5ddd964a6
Diffstat (limited to 'src/editing_tools')
-rw-r--r-- | src/editing_tools/EditingTools.vala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/editing_tools/EditingTools.vala b/src/editing_tools/EditingTools.vala index 0042d57..3345a3f 100644 --- a/src/editing_tools/EditingTools.vala +++ b/src/editing_tools/EditingTools.vala @@ -1294,11 +1294,13 @@ public class CropTool : EditingTool { // scaled_crop is not maintained relative to photo's position on canvas Box offset_scaled_crop = scaled_crop.get_offset(scaled_pixbuf_pos.x, scaled_pixbuf_pos.y); + var xmul = (int)Math.lround(x * Application.get_scale()); + var ymul = (int)Math.lround(y * Application.get_scale()); + // determine where the mouse down landed and store for future events - in_manipulation = offset_scaled_crop.approx_location((int)Math.lround(x * Application.get_scale()), - (int)Math.lround(y * Application.get_scale())); - last_grab_x = x -= scaled_pixbuf_pos.x; - last_grab_y = y -= scaled_pixbuf_pos.y; + in_manipulation = offset_scaled_crop.approx_location(xmul, ymul); + last_grab_x = xmul - scaled_pixbuf_pos.x; + last_grab_y = ymul - scaled_pixbuf_pos.y; // repaint because the crop changes on a mouse down canvas.repaint(); |