summaryrefslogtreecommitdiffstats
path: root/src/pen-context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pen-context.cpp')
-rw-r--r--src/pen-context.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 19e0351a3..2be2fd87b 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -311,7 +311,8 @@ spdc_endpoint_snap(SPPenContext const *const pc, Geom::Point &p, guint const sta
pen_set_to_nearest_horiz_vert(pc, p, state, true);
} else {
// snap freely
- spdc_endpoint_snap_free(pc, p, state);
+ boost::optional<Geom::Point> origin = pc->npoints > 0 ? pc->p[0] : boost::optional<Geom::Point>();
+ spdc_endpoint_snap_free(pc, p, origin, state); // pass the origin, to allow for perpendicular / tangential snapping
}
}
}
@@ -329,7 +330,8 @@ spdc_endpoint_snap_handle(SPPenContext const *const pc, Geom::Point &p, guint co
spdc_endpoint_snap_rotation(pc, p, pc->p[pc->npoints - 2], state);
} else {
if (!(state & GDK_SHIFT_MASK)) { //SHIFT disables all snapping, except the angular snapping above
- spdc_endpoint_snap_free(pc, p, state);
+ boost::optional<Geom::Point> origin = pc->p[pc->npoints - 2];
+ spdc_endpoint_snap_free(pc, p, origin, state);
}
}
}