summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-02-18 11:31:11 +0000
committerJabiertxof <jtx@jtx>2017-02-18 11:31:11 +0000
commitb2f88d76af6a23dea81547f35d9fc8060df255d1 (patch)
tree858cd119b62040aa4acd1220434253e3fd74bb27 /src
parentImplement Undo. Respond to external changes to <style> element. (diff)
downloadinkscape-b2f88d76af6a23dea81547f35d9fc8060df255d1.tar.gz
inkscape-b2f88d76af6a23dea81547f35d9fc8060df255d1.zip
Fix bug on rotate copies with one line vertical input
Fixed bugs: - https://launchpad.net/bugs/1665463 (bzr r15529)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 15ee5eb24..26912115e 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -374,11 +374,11 @@ LPECopyRotate::doBeforeEffect (SPLPEItem const* lpeitem)
num_copies.param_set_increments(1.0, 10.0);
}
- if (dist_angle_handle < 1.0) {
- dist_angle_handle = 1.0;
- }
A = Point(boundingbox_X.min(), boundingbox_Y.middle());
B = Point(boundingbox_X.middle(), boundingbox_Y.middle());
+ if (Geom::are_near(A, B, 0.01)) {
+ B += Geom::Point(1.0, 0.0);
+ }
dir = unit_vector(B - A);
// I first suspected the minus sign to be a bug in 2geom but it is
// likely due to SVG's choice of coordinate system orientation (max)
@@ -391,6 +391,9 @@ LPECopyRotate::doBeforeEffect (SPLPEItem const* lpeitem)
dist_angle_handle = L2(starting_point - origin);
}
}
+ if (dist_angle_handle < 1.0) {
+ dist_angle_handle = 1.0;
+ }
start_pos = origin + dir * Rotate(-rad_from_deg(starting_angle)) * dist_angle_handle;
rot_pos = origin + dir * Rotate(-rad_from_deg(rotation_angle+starting_angle)) * dist_angle_handle;
near = Geom::are_near(start_pos, (Geom::Point)starting_point, 0.01);