diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-03-18 09:12:01 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-03-18 09:12:01 +0000 |
| commit | 5caa096fb1cff5a744442aaa9b74dd644a243e02 (patch) | |
| tree | 8a8db608984c6a41fce66bff13d7df641f7173a3 /src/star-context.cpp | |
| parent | move masks to their own page, move tablet checkbox to mouse, copyedit (diff) | |
| download | inkscape-5caa096fb1cff5a744442aaa9b74dd644a243e02.tar.gz inkscape-5caa096fb1cff5a744442aaa9b74dd644a243e02.zip | |
Implement snapping in shape-tools during initial-drawing
(bzr r2690)
Diffstat (limited to 'src/star-context.cpp')
| -rw-r--r-- | src/star-context.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/star-context.cpp b/src/star-context.cpp index 03954e939..611866acf 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -276,7 +276,7 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent sc->center = Inkscape::setup_for_drag_start(desktop, event_context, event); SnapManager const &m = desktop->namedview->snap_manager; - sc->center = m.freeSnap(Inkscape::Snapper::SNAP_POINT, sc->center, sc->item).getPoint(); + sc->center = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, sc->center, sc->item).getPoint(); sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | @@ -299,7 +299,11 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent event_context->within_tolerance = false; NR::Point const motion_w(event->motion.x, event->motion.y); - NR::Point const motion_dt(event_context->desktop->w2d(motion_w)); + NR::Point motion_dt(event_context->desktop->w2d(motion_w)); + + SnapManager const &m = desktop->namedview->snap_manager; + motion_dt = m.freeSnap(Inkscape::Snapper::BBOX_POINT | Inkscape::Snapper::SNAP_POINT, motion_dt, sc->item).getPoint(); + sp_star_drag (sc, motion_dt, event->motion.state); ret = TRUE; } |
