Code

Added wrappers for the "optiongroup" type that correspond to existing "float", "enum...
[inkscape.git] / src / box3d-context.cpp
index ad9c51f0fda674e20c289a984beb2294b4f098dd..5534aa4109187b45df4c6d2ae009b06b9d1f171d 100644 (file)
@@ -358,8 +358,8 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
             }
 
             if (!bc->extruded) {
-               bc->drag_ptB = from_2geom(motion_dt);
-               bc->drag_ptC = from_2geom(motion_dt);
+                bc->drag_ptB = from_2geom(motion_dt);
+                bc->drag_ptC = from_2geom(motion_dt);
 
                 bc->drag_ptB_proj = cur_persp->perspective_impl->tmat.preimage (from_2geom(motion_dt), 0, Proj::Z);
                 bc->drag_ptC_proj = bc->drag_ptB_proj;
@@ -387,6 +387,13 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
             sp_box3d_drag(*bc, event->motion.state);
 
             ret = TRUE;
+        } else if (!sp_event_context_knot_mouseover(bc)) {
+            SnapManager &m = desktop->namedview->snap_manager;
+            m.setup(desktop);
+
+            Geom::Point const motion_w(event->motion.x, event->motion.y);
+            Geom::Point motion_dt(desktop->w2d(motion_w));
+            m.preSnap(Inkscape::SnapCandidatePoint(motion_dt, Inkscape::SNAPSOURCE_NODE_HANDLE));
         }
         break;
     case GDK_BUTTON_RELEASE: