diff options
| -rw-r--r-- | src/object-snapper.cpp | 10 | ||||
| -rw-r--r-- | src/snap.cpp | 1 | ||||
| -rw-r--r-- | src/snapper.h | 1 |
3 files changed, 5 insertions, 7 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 5bb7f0d00..987b027b0 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -502,8 +502,9 @@ void Inkscape::ObjectSnapper::_snapPaths(SnappedConstraints &sc, } } - int num_path = 0; - int num_segm = 0; + int num_path = 0; // _paths_to_snap_to contains multiple path_vectors, each containing multiple paths. + // num_path will count the paths, and will not be zeroed for each path_vector. It will + // continue counting bool strict_snapping = _snapmanager->snapprefs.getStrictSnapping(); @@ -549,13 +550,12 @@ void Inkscape::ObjectSnapper::_snapPaths(SnappedConstraints &sc, if (!being_edited || (c1 && c2)) { Geom::Coord const dist = Geom::distance(sp_doc, p_doc); if (dist < getSnapperTolerance()) { - sc.curves.push_back(SnappedCurve(sp_dt, num_path, num_segm, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, curve, p.getSourceType(), p.getSourceNum(), it_p->target_type, it_p->target_bbox)); + sc.curves.push_back(SnappedCurve(sp_dt, num_path, index, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, curve, p.getSourceType(), p.getSourceNum(), it_p->target_type, it_p->target_bbox)); } } } - num_segm++; + num_path++; } // End of: for (Geom::PathVector::iterator ....) - num_path++; } } } diff --git a/src/snap.cpp b/src/snap.cpp index 67630399f..5779e59b0 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -1149,7 +1149,6 @@ Inkscape::SnappedPoint SnapManager::findBestSnap(Inkscape::SnapCandidatePoint co /* std::cout << "Type and number of snapped constraints: " << std::endl; std::cout << " Points : " << sc.points.size() << std::endl; - // std::cout << " Lines : " << sc.lines.size() << std::endl; std::cout << " Grid lines : " << sc.grid_lines.size()<< std::endl; std::cout << " Guide lines : " << sc.guide_lines.size()<< std::endl; std::cout << " Curves : " << sc.curves.size()<< std::endl; diff --git a/src/snapper.h b/src/snapper.h index b3bf9f726..0fee9c7ed 100644 --- a/src/snapper.h +++ b/src/snapper.h @@ -25,7 +25,6 @@ struct SnappedConstraints { std::list<Inkscape::SnappedPoint> points; - //std::list<Inkscape::SnappedLineSegment> lines; std::list<Inkscape::SnappedLine> grid_lines; std::list<Inkscape::SnappedLine> guide_lines; std::list<Inkscape::SnappedCurve> curves; |
