summaryrefslogtreecommitdiffstats
path: root/src/snapper.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-03-08 11:32:18 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-03-08 11:32:18 +0000
commit0a78ad638f3bbcd46631cb2c741fca031356b725 (patch)
treee7e0378939debb249a67c9e658bcef959b3b1a57 /src/snapper.cpp
parentmake the infobox narrower and place add button above it (diff)
downloadinkscape-0a78ad638f3bbcd46631cb2c741fca031356b725.tar.gz
inkscape-0a78ad638f3bbcd46631cb2c741fca031356b725.zip
Node tool: snap to paths and their nodes, incl. to the path currently being edited
(bzr r4989)
Diffstat (limited to 'src/snapper.cpp')
-rw-r--r--src/snapper.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/snapper.cpp b/src/snapper.cpp
index 5f5261885..f8f7705f2 100644
--- a/src/snapper.cpp
+++ b/src/snapper.cpp
@@ -97,20 +97,21 @@ void Inkscape::Snapper::setEnabled(bool s)
* \return Snapped point.
*/
-void Inkscape::Snapper::freeSnap(SnappedConstraints &sc,
-
+void Inkscape::Snapper::freeSnap(SnappedConstraints &sc,
PointType const &t,
NR::Point const &p,
bool const &first_point,
- std::vector<NR::Point> &points_to_snap,
+ std::vector<NR::Point> &points_to_snap,
SPItem const *it) const
{
std::list<SPItem const *> lit;
- lit.push_back(it);
- freeSnap(sc, t, p, first_point, points_to_snap, lit);
+ if (it) {
+ lit.push_back(it);
+ }
+
+ freeSnap(sc, t, p, first_point, points_to_snap, lit, NULL);
}
-
/**
* Try to snap a point to whatever this snapper is interested in. Any
* snap that occurs will be to the nearest "interesting" thing (e.g. a
@@ -127,14 +128,15 @@ void Inkscape::Snapper::freeSnap(SnappedConstraints &sc,
PointType const &t,
NR::Point const &p,
bool const &first_point,
- std::vector<NR::Point> &points_to_snap,
- std::list<SPItem const *> const &it) const
+ std::vector<NR::Point> &points_to_snap,
+ std::list<SPItem const *> const &it,
+ std::vector<NR::Point> *unselected_nodes) const
{
if (_snap_enabled == false || getSnapFrom(t) == false) {
return;
}
- _doFreeSnap(sc, t, p, first_point, points_to_snap, it);
+ _doFreeSnap(sc, t, p, first_point, points_to_snap, it, unselected_nodes);
}