diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/selection-chemistry.cpp | 7 | ||||
| -rw-r--r-- | src/snap.cpp | 54 | ||||
| -rw-r--r-- | src/snap.h | 10 |
3 files changed, 1 insertions, 70 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 95a2cac0d..e5e2cdc01 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1161,15 +1161,10 @@ void sp_selection_paste(bool in_place) m -= sel_bbox->midpoint(); } - /* Snap the offset of the new item(s) to the grid */ - SnapManager &sm = desktop->namedview->snap_manager; - SnapManager::SnapperList gs = sm.getGridSnappers(); - m = sm.freeSnapAlways(Inkscape::Snapper::SNAPPOINT_NODE, m, NULL, gs).getPoint(); sp_selection_move_relative(selection, m); } - sp_document_done(document, SP_VERB_EDIT_PASTE, - _("Paste")); + sp_document_done(document, SP_VERB_EDIT_PASTE, _("Paste")); } void sp_selection_paste_style() diff --git a/src/snap.cpp b/src/snap.cpp index edc30e21a..a6b91e074 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -216,60 +216,6 @@ Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::Snapper::PointType t, } /** - * Try to snap a point to any of the specified snappers. Snap always, ignoring the snap-distance - * - * \param t Type of point. - * \param p Point. - * \param it Item to ignore when snapping. - * \param snappers List of snappers to try to snap to - * \return Snapped point. - */ - -Inkscape::SnappedPoint -SnapManager::freeSnapAlways( Inkscape::Snapper::PointType t, - NR::Point const &p, - SPItem const *it, - SnapperList &snappers ) -{ - std::list<SPItem const *> lit; - lit.push_back(it); - return freeSnapAlways(t, p, lit, snappers); -} - -/** - * Try to snap a point to any of the specified snappers. Snap always, ignoring the snap-distance - * - * \param t Type of point. - * \param p Point. - * \param it List of items to ignore when snapping. - * \param snappers List of snappers to try to snap to - * \return Snapped point. - */ - -Inkscape::SnappedPoint -SnapManager::freeSnapAlways( Inkscape::Snapper::PointType t, - NR::Point const &p, - std::list<SPItem const *> const &it, - SnapperList &snappers ) -{ - - SnappedConstraints sc; - - for (SnapperList::iterator i = snappers.begin(); i != snappers.end(); i++) { - gdouble const curr_gridsnap = (*i)->getDistance(); - const_cast<Inkscape::Snapper*> (*i)->setDistance(NR_HUGE); - std::vector<NR::Point> points_to_snap; - points_to_snap.push_back(p); - (*i)->freeSnap(sc, t, p, true, points_to_snap, it); - const_cast<Inkscape::Snapper*> (*i)->setDistance(curr_gridsnap); - } - - return findBestSnap(p, sc); -} - - - -/** * Try to snap a point to any interested snappers. A snap will only occur along * a line described by a Inkscape::Snapper::ConstraintLine. * diff --git a/src/snap.h b/src/snap.h index 88254430c..9547064a9 100644 --- a/src/snap.h +++ b/src/snap.h @@ -55,16 +55,6 @@ public: std::vector<NR::Point> &points_to_snap, std::list<SPItem const *> const &it) const; - Inkscape::SnappedPoint freeSnapAlways( Inkscape::Snapper::PointType t, - NR::Point const &p, - SPItem const *it, - SnapperList &snappers ); - - Inkscape::SnappedPoint freeSnapAlways( Inkscape::Snapper::PointType t, - NR::Point const &p, - std::list<SPItem const *> const &it, - SnapperList &snappers ); - Inkscape::SnappedPoint constrainedSnap(Inkscape::Snapper::PointType t, NR::Point const &p, Inkscape::Snapper::ConstraintLine const &c, |
