summaryrefslogtreecommitdiffstats
path: root/src/rect-context.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-11-25 20:51:17 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-11-25 20:51:17 +0000
commit0bd9f7e209d522dbcebe0449a91397fdd9e38977 (patch)
tree834c7d02456658b57625ab68cc28f7854a5a85dc /src/rect-context.cpp
parentFix handling of x and y attributes of patterns (diff)
parentFix ruler redraw issue on GTK 2.22 (diff)
downloadinkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.tar.gz
inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.zip
Merge from trunk
(bzr r9508.1.70)
Diffstat (limited to 'src/rect-context.cpp')
-rw-r--r--src/rect-context.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index 7ae27c13d..86f0b54a3 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -110,6 +110,7 @@ static void sp_rect_context_init(SPRectContext *rect_context)
event_context->tolerance = 0;
event_context->within_tolerance = false;
event_context->item_to_select = NULL;
+ event_context->tool_url = "/tools/shapes/rect";
rect_context->item = NULL;
@@ -284,6 +285,7 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
m.freeSnapReturnByRef(button_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
+ m.unSetup();
rc->center = from_2geom(button_dt);
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -323,7 +325,9 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
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));
+ m.unSetup();
}
break;
case GDK_BUTTON_RELEASE:
@@ -584,4 +588,4 @@ static void sp_rect_cancel(SPRectContext *rc)
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 :