X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fnode-context.cpp;h=774e0813e5c4da5ceed8fe565a58ec7e10b7c739;hb=4cc63b00182b8f4b23705a6da086b601a2b5a646;hp=3142e5b0eae313f7d112e5d6580387e9a7d46f40;hpb=83ff7f00be061fc3aa728a198c15288b89e7160f;p=inkscape.git diff --git a/src/node-context.cpp b/src/node-context.cpp index 3142e5b0e..774e0813e 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -26,11 +26,9 @@ #include "desktop-handles.h" #include "selection.h" #include "pixmaps/cursor-node.xpm" -#include "pixmaps/cursor-node.pixbuf" #include "message-context.h" #include "node-context.h" #include "pixmaps/cursor-node-d.xpm" -#include "pixmaps/cursor-node-d.pixbuf" #include "prefs-utils.h" #include "xml/node-event-vector.h" #include "style.h" @@ -100,11 +98,6 @@ sp_node_context_init(SPNodeContext *node_context) SPEventContext *event_context = SP_EVENT_CONTEXT(node_context); event_context->cursor_shape = cursor_node_xpm; - event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline( - -1, - cursor_node_pixbuf, - FALSE, - NULL); event_context->hot_x = 1; event_context->hot_y = 1; @@ -378,6 +371,7 @@ sp_node_context_is_over_stroke (SPNodeContext *nc, SPItem *item, NR::Point event nc->curvepoint_doc *= sp_item_dt2i_affine(item); nc->curvepoint_doc *= sp_item_i2doc_affine(item); + sp_nodepath_ensure_livarot_path(nc->nodepath); NR::Maybe position = get_nearest_position_on_Path(nc->nodepath->livarot_path, nc->curvepoint_doc); NR::Point nearest = get_point_on_Path(nc->nodepath->livarot_path, position.assume().piece, position.assume().t); NR::Point delta = nearest - nc->curvepoint_doc; @@ -586,10 +580,12 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) nc->curvepoint_event[NR::Y] = (gint) event->motion.y; gobble_motion_events(GDK_BUTTON1_MASK); } else { - NR::Point const motion_w(event->motion.x, - event->motion.y); - NR::Point const motion_dt(desktop->w2d(motion_w)); - Inkscape::Rubberband::get()->move(motion_dt); + if (Inkscape::Rubberband::get()->is_started()) { + NR::Point const motion_w(event->motion.x, + event->motion.y); + NR::Point const motion_dt(desktop->w2d(motion_w)); + Inkscape::Rubberband::get()->move(motion_dt); + } } nc->drag = TRUE; ret = TRUE; @@ -607,22 +603,12 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) if (nc->cursor_drag && !over_stroke) { event_context->cursor_shape = cursor_node_xpm; - event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline( - -1, - cursor_node_pixbuf, - FALSE, - NULL); event_context->hot_x = 1; event_context->hot_y = 1; sp_event_context_update_cursor(event_context); nc->cursor_drag = false; } else if (!nc->cursor_drag && over_stroke) { event_context->cursor_shape = cursor_node_d_xpm; - event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline( - -1, - cursor_node_d_pixbuf, - FALSE, - NULL); event_context->hot_x = 1; event_context->hot_y = 1; sp_event_context_update_cursor(event_context);