From 56d21c36a86a361bbe742cab3402b1820d6a5474 Mon Sep 17 00:00:00 2001 From: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> Date: Mon, 18 Nov 2019 11:38:48 +1100 Subject: Make canvas rotation unchanged by y-axis direction Y-axis direction is stored in `_scale`. Based off of Thomas Holder's input, fixes inkscape/510, MR 1029. --- src/desktop.h | 2 +- src/verbs.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/desktop.h b/src/desktop.h index 5e1bca975..a8d93278b 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -553,7 +553,7 @@ private: private: void _update() { - _d2w = _rotate * _scale * _flip; + _d2w = _scale * _rotate * _flip; _w2d = _d2w.inverse(); } Geom::Affine _w2d; // Window to desktop diff --git a/src/verbs.cpp b/src/verbs.cpp index 63c5295f8..32c2a850c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1948,12 +1948,12 @@ void ZoomVerb::perform(SPAction *action, void *data) SPCurve *rc = SP_DRAW_CONTEXT(ec)->red_curve; if (!rc->is_empty()) { Geom::Point const rotate_to (*rc->last_point()); - dt->rotate_relative_keep_point(rotate_to, -mul*rotate_inc); + dt->rotate_relative_keep_point(rotate_to, mul * rotate_inc); break; } } - dt->rotate_relative_center_point( midpoint, -mul*rotate_inc); + dt->rotate_relative_center_point(midpoint, mul * rotate_inc); break; } case SP_VERB_ROTATE_CCW: @@ -1964,16 +1964,16 @@ void ZoomVerb::perform(SPAction *action, void *data) SPCurve *rc = SP_DRAW_CONTEXT(ec)->red_curve; if (!rc->is_empty()) { Geom::Point const rotate_to (*rc->last_point()); - dt->rotate_relative_keep_point(rotate_to, mul*rotate_inc); + dt->rotate_relative_keep_point(rotate_to, -mul * rotate_inc); break; } } - dt->rotate_relative_center_point( midpoint, mul*rotate_inc); + dt->rotate_relative_center_point(midpoint, -mul * rotate_inc); break; } case SP_VERB_ROTATE_ZERO: - dt->rotate_absolute_center_point( midpoint, 0.0 ); + dt->rotate_absolute_center_point(midpoint, 0.0); break; case SP_VERB_FLIP_HORIZONTAL: { -- cgit v1.2.3