From e7b931159fcc710541c5fa2fbfd82704a044eb23 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sun, 30 Sep 2018 19:41:14 +0200 Subject: fix Align > Rearrange > clockwise with y-axis down --- src/ui/dialog/align-and-distribute.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index b21fd2956..c606f52bf 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -580,6 +580,9 @@ private : // First criteria: Sort according to the angle to the center point double angle_a = atan2(double(point_a[Geom::Y]), double(point_a[Geom::X])); double angle_b = atan2(double(point_b[Geom::Y]), double(point_b[Geom::X])); + double dt_yaxisdir = SP_ACTIVE_DESKTOP ? SP_ACTIVE_DESKTOP->yaxisdir() : 1; + angle_a *= -dt_yaxisdir; + angle_b *= -dt_yaxisdir; if (angle_a != angle_b) return (angle_a < angle_b); // Second criteria: Sort according to the distance the center point Geom::Coord length_a = point_a.length(); -- cgit v1.2.3