summaryrefslogtreecommitdiffstats
path: root/src/box3d-context.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-01-23 13:36:56 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-01-23 13:36:56 +0000
commitc4aa590bedcf358acf15bdf0d8134ae99e3be167 (patch)
tree6808d0d57dfb83e91d02762c3c12225f1053c83e /src/box3d-context.cpp
parentFix some of the LPE issues. (diff)
downloadinkscape-c4aa590bedcf358acf15bdf0d8134ae99e3be167.tar.gz
inkscape-c4aa590bedcf358acf15bdf0d8134ae99e3be167.zip
Remove redundancy from snapping API (type of snapsource no longer has to be specified explicitly)
(bzr r9014)
Diffstat (limited to 'src/box3d-context.cpp')
-rw-r--r--src/box3d-context.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index c8fbfa877..ad9c51f0f 100644
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -316,7 +316,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
/* Snap center */
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, true, bc->item);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, button_dt, Inkscape::SNAPSOURCE_HANDLE);
+ m.freeSnapReturnByRef(button_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
bc->center = from_2geom(button_dt);
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -348,7 +348,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, true, bc->item);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, motion_dt, Inkscape::SNAPSOURCE_HANDLE);
+ m.freeSnapReturnByRef(motion_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
bc->ctrl_dragged = event->motion.state & GDK_CONTROL_MASK;
@@ -381,9 +381,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
bc->drag_ptB_proj.normalize();
bc->drag_ptC_proj = cur_persp->perspective_impl->tmat.preimage (from_2geom(motion_dt), bc->drag_ptB_proj[Proj::X], Proj::X);
}
- Geom::Point pt2g = to_2geom(bc->drag_ptC);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, pt2g, Inkscape::SNAPSOURCE_HANDLE);
- bc->drag_ptC = from_2geom(pt2g);
+ m.freeSnapReturnByRef(bc->drag_ptC, Inkscape::SNAPSOURCE_NODE_HANDLE);
}
sp_box3d_drag(*bc, event->motion.state);