diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp
index 4e5ca836daa957905e84852a3616b946b1a077f2..02f7ed165b0cf25b83c71e0f5651bb6565e4dd6b 100644 (file)
--- a/src/snapped-point.cpp
+++ b/src/snapped-point.cpp
}
-NR::Point Inkscape::SnappedPoint::getPoint() const
+void Inkscape::SnappedPoint::getPoint(NR::Point &p) const
{
- return _point;
+ // When we have snapped
+ if (getSnapped()) {
+ // then return the snapped point by overwriting p
+ p = _point;
+ } //otherwise p will be left untouched; this way the caller doesn't have to check wether we've snapped
}
// search for the closest snapped point