diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 37e9e210c47d05a2218dbdf80d3a804dbc75d6b9..14f4470bc1241b9fe240d565846c0fbac8235565 100644 (file)
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -283,6 +283,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
if ( event->button.button == 1 && !event_context->space_panning) {
Geom::Point const button_w(event->button.x,
event->button.y);
+ Geom::Point button_dt(desktop->w2d(button_w));
// save drag origin
event_context->xp = (gint) button_w[Geom::X];
@@ -294,8 +295,12 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
dragging = true;
- /* */
- Geom::Point button_dt(desktop->w2d(button_w));
+ SnapManager &m = desktop->namedview->snap_manager;
+ m.setup(desktop, true, bc->item);
+ m.freeSnapReturnByRef(button_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
+ m.unSetup();
+ bc->center = from_2geom(button_dt);
+
bc->drag_origin = from_2geom(button_dt);
bc->drag_ptB = from_2geom(button_dt);
bc->drag_ptC = from_2geom(button_dt);
@@ -313,13 +318,6 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
bc->drag_ptC_proj.normalize();
bc->drag_ptC_proj[Proj::Z] = 0.25;
- /* Snap center */
- SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop, true, bc->item);
- m.freeSnapReturnByRef(button_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
- m.unSetup();
- bc->center = from_2geom(button_dt);
-
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
( GDK_KEY_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :