diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-08-04 21:09:10 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-08-04 21:09:10 +0000 |
| commit | dc282cc4f6e376f45d24087e76527560d21e495b (patch) | |
| tree | ffc6a6007ed4ec57d7afa19286f1241332af893d /src/pencil-context.cpp | |
| parent | NR:: => Geom:: for util dir (diff) | |
| download | inkscape-dc282cc4f6e376f45d24087e76527560d21e495b.tar.gz inkscape-dc282cc4f6e376f45d24087e76527560d21e495b.zip | |
While drawing and constraining to specific angles (using CTRL): don't try a freeSnap() after we've already tried a constrainedSnap()
(bzr r6560)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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); + } + } } /** |
