diff options
| author | Carl Hetherington <cth@carlh.net> | 2006-05-03 11:01:57 +0000 |
|---|---|---|
| committer | cth103 <cth103@users.sourceforge.net> | 2006-05-03 11:01:57 +0000 |
| commit | 672c5870a6c912439bc0fc2655ed4368b2007082 (patch) | |
| tree | 6435ef7371b017bb318cab12ef82864086826cd7 /src/pencil-context.cpp | |
| parent | small update for 1480247 fix (cleaned up the redundant code) (diff) | |
| download | inkscape-672c5870a6c912439bc0fc2655ed4368b2007082.tar.gz inkscape-672c5870a6c912439bc0fc2655ed4368b2007082.zip | |
Give SPNamedView a SnapManager instance and use it for all management of snapping settings.
(bzr r701)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index ccb7c97e9..3265d87bf 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -35,6 +35,7 @@ #include "libnr/in-svg-plane.h" #include "libnr/n-art-bpath.h" #include "context-fns.h" +#include "sp-namedview.h" static void sp_pencil_context_class_init(SPPencilContextClass *klass); static void sp_pencil_context_init(SPPencilContext *pc); @@ -233,7 +234,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve // anchor, which is handled by the sibling branch above) selection->clear(); desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Creating new path")); - SnapManager const m(desktop->namedview); + SnapManager const &m = desktop->namedview->snap_manager; p = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, p, NULL).getPoint(); } else if (selection->singleItem() && SP_IS_PATH(selection->singleItem())) { desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Appending to selected path")); @@ -302,7 +303,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev if (anchor) { p = anchor->dp; } else if ((mevent.state & GDK_SHIFT_MASK) == 0) { - SnapManager const m(dt->namedview); + SnapManager const &m = dt->namedview->snap_manager; p = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, p, NULL).getPoint(); } if ( pc->npoints != 0 ) { // buttonpress may have happened before we entered draw context! |
