summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-08-07 20:05:00 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-08-07 20:05:00 +0000
commit122d4274f150001d17154b72178ef1b53125c66c (patch)
tree24b90705ce1d319bf04129965d1a502618952b46 /src
parentwarn when ConvertToShape fails (diff)
downloadinkscape-122d4274f150001d17154b72178ef1b53125c66c.tar.gz
inkscape-122d4274f150001d17154b72178ef1b53125c66c.zip
Only in the selector tool we should snap in bbox mode (PointType = SNAPPOINT_BBOX)
(bzr r3415)
Diffstat (limited to 'src')
-rw-r--r--src/arc-context.cpp4
-rw-r--r--src/box3d-context.cpp6
-rw-r--r--src/connector-context.cpp2
-rw-r--r--src/draw-context.cpp5
-rw-r--r--src/gradient-context.cpp2
-rw-r--r--src/gradient-drag.cpp2
-rw-r--r--src/object-edit.cpp2
-rw-r--r--src/pencil-context.cpp4
-rw-r--r--src/rect-context.cpp4
-rw-r--r--src/spiral-context.cpp4
-rw-r--r--src/star-context.cpp4
-rw-r--r--src/ui/dialog/document-properties.cpp2
12 files changed, 20 insertions, 21 deletions
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index ef77ce78f..44c85bf0b 100644
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
@@ -264,7 +264,7 @@ static gint sp_arc_context_root_handler(SPEventContext *event_context, GdkEvent
ac->center = Inkscape::setup_for_drag_start(desktop, event_context, event);
SnapManager const &m = desktop->namedview->snap_manager;
- ac->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, ac->center, ac->item).getPoint();
+ ac->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, ac->center, ac->item).getPoint();
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
@@ -290,7 +290,7 @@ static gint sp_arc_context_root_handler(SPEventContext *event_context, GdkEvent
NR::Point motion_dt(desktop->w2d(motion_w));
SnapManager const &m = desktop->namedview->snap_manager;
- motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, ac->item).getPoint();
+ motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, ac->item).getPoint();
sp_arc_drag(ac, motion_dt, event->motion.state);
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index de1a4e2bf..0ef2277ea 100644
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -327,7 +327,7 @@ static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEven
/* Snap center */
SnapManager const &m = desktop->namedview->snap_manager;
- bc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX,
+ bc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE,
button_dt, bc->item).getPoint();
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -358,7 +358,7 @@ static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEven
NR::Point motion_dt(desktop->w2d(motion_w));
SnapManager const &m = desktop->namedview->snap_manager;
- motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, bc->item).getPoint();
+ motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, bc->item).getPoint();
bc->ctrl_dragged = event->motion.state & GDK_CONTROL_MASK;
@@ -379,7 +379,7 @@ static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEven
} else {
bc->drag_ptC = motion_dt;
}
- bc->drag_ptC = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, bc->drag_ptC, bc->item).getPoint();
+ bc->drag_ptC = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, bc->drag_ptC, bc->item).getPoint();
if (bc->ctrl_dragged) {
Box3D::PerspectiveLine pl1 (NR::Point (event_context->xp, event_context->yp), Box3D::Y, Box3D::Perspective3D::current_perspective);
Box3D::PerspectiveLine pl2 (bc->drag_ptB, Box3D::X, Box3D::Perspective3D::current_perspective);
diff --git a/src/connector-context.cpp b/src/connector-context.cpp
index 7e8058eee..a072afeda 100644
--- a/src/connector-context.cpp
+++ b/src/connector-context.cpp
@@ -529,7 +529,7 @@ connector_handle_button_press(SPConnectorContext *const cc, GdkEventButton const
// This is the first point, so just snap it to the grid
// as there's no other points to go off.
SnapManager const &m = cc->desktop->namedview->snap_manager;
- p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX,
+ p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE,
p, NULL).getPoint();
}
spcc_connector_set_initial_point(cc, p);
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 6742ddaf3..43e028aa5 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -354,7 +354,7 @@ void spdc_endpoint_snap_rotation(SPEventContext const *const ec, NR::Point &p, N
/* Snap it along best vector */
SnapManager const &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager;
- p = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX,
+ p = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE,
p, Inkscape::Snapper::ConstraintLine(best), NULL).getPoint();
}
}
@@ -367,9 +367,8 @@ void spdc_endpoint_snap_free(SPEventContext const * const ec, NR::Point& p, guin
return;
}
- /* FIXME: this should be doing bbox snap as well */
SnapManager const &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager;
- p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, p, NULL).getPoint();
+ p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p, NULL).getPoint();
}
static SPCurve *
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index 758759d6a..f83625abe 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -413,7 +413,7 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
/* Snap center to nearest magnetic point */
SnapManager const &m = desktop->namedview->snap_manager;
- rc->origin = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, button_dt, NULL).getPoint();
+ rc->origin = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, button_dt, NULL).getPoint();
ret = TRUE;
}
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index f4070079b..171881a78 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -436,7 +436,7 @@ gr_knot_moved_handler(SPKnot *knot, NR::Point const *ppointer, guint state, gpoi
if (!((state & GDK_SHIFT_MASK) || ((state & GDK_CONTROL_MASK) && (state & GDK_MOD1_MASK)))) {
// Try snapping to the grid or guides
SnapManager const &m = dragger->parent->desktop->namedview->snap_manager;
- Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX, p, NULL);
+ Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p, NULL);
if (s.getDistance() < 1e6) {
p = s.getPoint();
sp_knot_moveto (knot, &p);
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index a0a8d4218..bd3bd1902 100644
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
@@ -224,7 +224,7 @@ static NR::Point snap_knot_position(SPItem *item, NR::Point const &p)
NR::Matrix const i2d (sp_item_i2d_affine (item));
NR::Point s = p * i2d;
SnapManager const &m = desktop->namedview->snap_manager;
- s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, s, item).getPoint();
+ s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, s, item).getPoint();
return s * i2d.inverse();
}
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index c32a6107a..cdadd0c71 100644
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -236,7 +236,7 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve
selection->clear();
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Creating new path"));
SnapManager const &m = desktop->namedview->snap_manager;
- p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, p, NULL).getPoint();
+ p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p, NULL).getPoint();
} else if (selection->singleItem() && SP_IS_PATH(selection->singleItem())) {
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Appending to selected path"));
}
@@ -306,7 +306,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev
p = anchor->dp;
} else if ((mevent.state & GDK_SHIFT_MASK) == 0) {
SnapManager const &m = dt->namedview->snap_manager;
- p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, p, NULL).getPoint();
+ p = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p, NULL).getPoint();
}
if ( pc->npoints != 0 ) { // buttonpress may have happened before we entered draw context!
spdc_add_freehand_point(pc, p, mevent.state);
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index 7de7aa507..71683ec8e 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -299,7 +299,7 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
/* Snap center */
SnapManager const &m = desktop->namedview->snap_manager;
- rc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX,
+ rc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE,
button_dt, rc->item).getPoint();
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -330,7 +330,7 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
NR::Point motion_dt(desktop->w2d(motion_w));
SnapManager const &m = desktop->namedview->snap_manager;
- motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, rc->item).getPoint();
+ motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, rc->item).getPoint();
sp_rect_drag(*rc, motion_dt, event->motion.state);
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 1014665a1..4e0fd9878 100644
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
@@ -264,7 +264,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
sc->center = Inkscape::setup_for_drag_start(desktop, event_context, event);
SnapManager const &m = desktop->namedview->snap_manager;
- sc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, sc->center, sc->item).getPoint();
+ sc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, sc->center, sc->item).getPoint();
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
( GDK_KEY_PRESS_MASK |
@@ -292,7 +292,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
NR::Point motion_dt(event_context->desktop->w2d(motion_w));
SnapManager const &m = desktop->namedview->snap_manager;
- motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, sc->item).getPoint();
+ motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, sc->item).getPoint();
sp_spiral_drag(sc, motion_dt, event->motion.state);
ret = TRUE;
diff --git a/src/star-context.cpp b/src/star-context.cpp
index b9eed3b0e..385d16d0c 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::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, sc->center, sc->item).getPoint();
+ sc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, sc->center, sc->item).getPoint();
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
@@ -302,7 +302,7 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent
NR::Point motion_dt(event_context->desktop->w2d(motion_w));
SnapManager const &m = desktop->namedview->snap_manager;
- motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, sc->item).getPoint();
+ motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, sc->item).getPoint();
sp_star_drag (sc, motion_dt, event->motion.state);
ret = TRUE;
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 062f838f9..e9dad3710 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -267,7 +267,7 @@ DocumentProperties::build_snap()
_page_snap.show();
//General options
_rcbsnbb.init (_("Snap bounding _box corners"),
- _("Snap bounding box corners to grid lines, to guides, and to other bounding boxes"),
+ _("Snap bounding box corners to grid lines, to guides, and to other bounding boxes (only applicable to the selector tool)"),
"inkscape:snap-bbox", _wr);
_rcbsnn.init (_("Snap _nodes"),
_("Snap nodes to grid lines, to guides, to paths, and to other nodes"),