diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-11-18 00:38:48 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-11-18 21:54:22 +0000 |
| commit | 56d21c36a86a361bbe742cab3402b1820d6a5474 (patch) | |
| tree | fba0a17d672218e8d0d3035fa3b6039eb111d83b | |
| parent | Selectively disable motion event compression for specific tools (diff) | |
| download | inkscape-56d21c36a86a361bbe742cab3402b1820d6a5474.tar.gz inkscape-56d21c36a86a361bbe742cab3402b1820d6a5474.zip | |
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.
| -rw-r--r-- | src/desktop.h | 2 | ||||
| -rw-r--r-- | 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: { |
