From dc282cc4f6e376f45d24087e76527560d21e495b Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 4 Aug 2008 21:09:10 +0000 Subject: While drawing and constraining to specific angles (using CTRL): don't try a freeSnap() after we've already tried a constrainedSnap() (bzr r6560) --- src/pencil-context.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/pencil-context.cpp') diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 0a5bc7444..894b5cd71 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -154,8 +154,15 @@ sp_pencil_context_dispose(GObject *object) static void spdc_endpoint_snap(SPPencilContext const *pc, NR::Point &p, guint const state) { - spdc_endpoint_snap_rotation(pc, p, pc->p[0], state); - spdc_endpoint_snap_free(pc, p, state); + if ((state & GDK_CONTROL_MASK)) { //CTRL enables constrained snapping + spdc_endpoint_snap_rotation(pc, p, pc->p[0], state); + } else { + if (!(state & GDK_SHIFT_MASK)) { //SHIFT disables all snapping, except the angular snapping above + //After all, the user explicitely asked for angular snapping by + //pressing CTRL + spdc_endpoint_snap_free(pc, p, state); + } + } } /** -- cgit v1.2.3