summaryrefslogtreecommitdiffstats
path: root/src/object-edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object-edit.cpp')
-rw-r--r--src/object-edit.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index fefdc8791..14539417b 100644
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
@@ -708,8 +708,10 @@ static void
sp_star_knot1_set(SPItem *item, NR::Point const &p, NR::Point const &origin, guint state)
{
SPStar *star = SP_STAR(item);
+
+ NR::Point const s = snap_knot_position(star, p);
- NR::Point d = p - star->center;
+ NR::Point d = s - star->center;
double arg1 = atan2(d);
double darg1 = arg1 - star->arg[0];
@@ -732,8 +734,11 @@ static void
sp_star_knot2_set(SPItem *item, NR::Point const &p, NR::Point const &origin, guint state)
{
SPStar *star = SP_STAR(item);
+
+ NR::Point const s = snap_knot_position(star, p);
+
if (star->flatsided == false) {
- NR::Point d = p - star->center;
+ NR::Point d = s - star->center;
double arg1 = atan2(d);
double darg1 = arg1 - star->arg[1];