summaryrefslogtreecommitdiffstats
path: root/src/draw-context.cpp
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2006-05-03 11:01:57 +0000
committercth103 <cth103@users.sourceforge.net>2006-05-03 11:01:57 +0000
commit672c5870a6c912439bc0fc2655ed4368b2007082 (patch)
tree6435ef7371b017bb318cab12ef82864086826cd7 /src/draw-context.cpp
parentsmall update for 1480247 fix (cleaned up the redundant code) (diff)
downloadinkscape-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/draw-context.cpp')
-rw-r--r--src/draw-context.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index d33a33f7b..aa1480c67 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -39,7 +39,7 @@
#include "selection-chemistry.h"
#include "snap.h"
#include "sp-path.h"
-
+#include "sp-namedview.h"
static void sp_draw_context_class_init(SPDrawContextClass *klass);
static void sp_draw_context_init(SPDrawContext *dc);
@@ -372,7 +372,7 @@ void spdc_endpoint_snap_rotation(SPEventContext const *const ec, NR::Point &p, N
p = o + bdot * best;
/* Snap it along best vector */
- SnapManager const m(SP_EVENT_CONTEXT_DESKTOP(ec)->namedview);
+ SnapManager const &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager;
p = m.constrainedSnap(Inkscape::Snapper::SNAP_POINT | Inkscape::Snapper::BBOX_POINT,
p, best, NULL).getPoint();
}
@@ -387,7 +387,7 @@ void spdc_endpoint_snap_free(SPEventContext const * const ec, NR::Point& p, guin
}
/* FIXME: this should be doing bbox snap as well */
- SnapManager const m(SP_EVENT_CONTEXT_DESKTOP(ec)->namedview);
+ SnapManager const &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager;
p = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, p, NULL).getPoint();
}