diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-05-12 18:58:04 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-05-12 18:58:04 +0000 |
| commit | de27d953d1c13d2e7563b43c2d959b1b02aee9c3 (patch) | |
| tree | efc8ed7eaba9a2b0ed87eaf14b797103bd8fa33a /src/pencil-context.cpp | |
| parent | fix typo (diff) | |
| download | inkscape-de27d953d1c13d2e7563b43c2d959b1b02aee9c3.tar.gz inkscape-de27d953d1c13d2e7563b43c2d959b1b02aee9c3.zip | |
Add a centralized check (i.e. in the snapper mechanism) whether we've snapped or not, instead of leaving it up to the various tools. This should prevent these tools from moving to (0,0) if they bluntly use the value returned by the snapping mechanism without checking whether snapping has really occured.
(bzr r5659)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index ae3a2fa48..87cbb8d12 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -248,7 +248,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Creating new path")); SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop); - p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p).getPoint(); + m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p); } else if (selection->singleItem() && SP_IS_PATH(selection->singleItem())) { desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Appending to selected path")); } @@ -325,8 +325,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev } else if ((mevent.state & GDK_SHIFT_MASK) == 0) { SnapManager &m = dt->namedview->snap_manager; m.setup(dt, NULL); - Inkscape::SnappedPoint const s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p); - p = s.getPoint(); + m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p); } if ( pc->npoints != 0 ) { // buttonpress may have happened before we entered draw context! spdc_add_freehand_point(pc, p, mevent.state); |
