diff --git a/src/snapped-point.h b/src/snapped-point.h
index 05e954e1e4ea6aaeb18a73ad0872f41ccb8936e9..b2a9fa1ce02d7b2698c7beeeccbf9f479b673f69 100644 (file)
--- a/src/snapped-point.h
+++ b/src/snapped-point.h
* to, because it only returns a point if snapping has actually occurred
* (by overwriting p)
*/
- void getPoint(Geom::Point &p) const;
+ void getPointIfSnapped(Geom::Point &p) const;
/* This method however always returns a point, even if no snapping
* has occurred; A check should be implemented in the calling code
* to check for snapping. Use this method only when really needed, e.g.
* when the calling code is trying to snap multiple points and must
- * determine itself which point is most appropriate
+ * determine itself which point is most appropriate, or when doing a
+ * constrainedSnap that also enforces projection onto the constraint (in
+ * which case you need the new point anyway, even if we didn't snap)
*/
Geom::Point getPoint() const {return _point;}
void setPoint(Geom::Point const &p) {_point = p;}
protected:
Geom::Point _point; // Location of the snapped point
SnapSourceType _source; // Describes what snapped
- long _source_num; // Sequence number of the source point that snapped, if that point is part of a set of points. (starting at zero)
+ long _source_num; // Sequence number of the source point that snapped, if that point is part of a set of points. (starting at zero if we might have a set of points; -1 if we only have a single point)
SnapTargetType _target; // Describes to what we've snapped to
bool _at_intersection; // If true, the snapped point is at an intersection
bool _constrained_snap; // If true, then the snapped point was found when looking for a constrained snap