From 34568b6a1d6b5151f6e962b03c3478db0d729676 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 7 Apr 2008 19:28:34 +0000 Subject: Refactor snapper and snapindicator (in order to enable the snapindicator in the selector tool) (bzr r5374) --- src/rect-context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rect-context.cpp') diff --git a/src/rect-context.cpp b/src/rect-context.cpp index a25b39961..1054a2c55 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -310,8 +310,8 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent SnapManager const &m = desktop->namedview->snap_manager; Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, button_dt, rc->item); rc->center = s.getPoint(); - if (s.getDistance() < NR_HUGE) { - desktop->snapindicator->set_new_snappoint(s.getPoint().to_2geom()); + if (s.getSnapped()) { + desktop->snapindicator->set_new_snappoint(s); } sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), @@ -344,8 +344,8 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent SnapManager const &m = desktop->namedview->snap_manager; Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, rc->item); motion_dt = s.getPoint(); - if (s.getDistance() < NR_HUGE) { - desktop->snapindicator->set_new_snappoint(s.getPoint().to_2geom()); + if (s.getSnapped()) { + desktop->snapindicator->set_new_snappoint(s); } sp_rect_drag(*rc, motion_dt, event->motion.state); -- cgit v1.2.3