summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 614ce7584..34ea17a64 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1413,10 +1413,9 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state)
/* Pick one */
Inkscape::SnappedPoint best_snapped_point;
- g_assert(best_snapped_point.getDistance() == NR_HUGE);
for (std::list<Inkscape::SnappedPoint>::const_iterator i = s.begin(); i != s.end(); i++) {
if (i->getSnapped()) {
- if (i->getDistance() < best_snapped_point.getDistance()) {
+ if (best_snapped_point.isOtherOneBetter(*i, true)) {
best_snapped_point = *i;
dxy = i->getTransformation();
}