From bc41980c93b8627b286daeb51bc29806a6c2b0f0 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Tue, 23 Aug 2011 21:17:19 +0200 Subject: 1) Use the "snap guides" button both for guides being snap sources, as well as for guides being snap targets 2) Remove some redundant guide-snapping code from the object snapper, (bzr r10576) --- src/object-snapper.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index da6eca027..82114e2c4 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -742,44 +742,6 @@ void Inkscape::ObjectSnapper::constrainedSnap( SnappedConstraints &sc, } } - -// This method is used to snap a guide to nodes, while dragging the guide around -void Inkscape::ObjectSnapper::guideFreeSnap(SnappedConstraints &sc, - Geom::Point const &p, - Geom::Point const &guide_normal) const -{ - if (!_snapmanager->snapprefs.getSnapModeOthers()) { - return; - } - - - //std::vector const it; //just an empty list - - freeSnap(sc, SnapCandidatePoint(p, SNAPSOURCE_GUIDE), Geom::Rect(p, p), NULL, NULL); - //_findCandidates(_snapmanager->getDocument()->getRoot(), &it, true, Geom::Rect(p, p), false, Geom::identity()); - //_snapTranslatingGuide(sc, p, guide_normal); - -} - -// This method is used to snap the origin of a guide to nodes/paths, while dragging the origin along the guide -void Inkscape::ObjectSnapper::guideConstrainedSnap(SnappedConstraints &sc, - Geom::Point const &p, - Geom::Point const &guide_normal, - SnapConstraint const &/*c*/) const -{ - /* Get a list of all the SPItems that we will try to snap to */ - std::vector cand; - std::vector const it; //just an empty list - - std::cout << "guideConstrainedSnap" << std::endl; - - if (_snapmanager->snapprefs.getSnapModeOthers()) { - _findCandidates(_snapmanager->getDocument()->getRoot(), &it, true, Geom::Rect(p, p), false, Geom::identity()); - _snapTranslatingGuide(sc, p, guide_normal); - } - -} - /** * \return true if this Snapper will snap at least one kind of point. */ -- cgit v1.2.3