From 906805aab186df9a92048a28962852921a50d334 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 22 Aug 2011 22:41:46 +0200 Subject: Fix another snapping bug (could occur when scaling an object using the selector tool) (bzr r10573) --- src/snap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index 30fc5387e..8c96cdfa1 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -853,7 +853,9 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( } // Compare the resulting scaling with the desired scaling - Geom::Point scale_metric = Geom::abs(result - transformation); // One or both of its components might be Geom::infinity() + Geom::Point scale_metric = result - transformation; // One or both of its components might be Geom::infinity() + scale_metric[0] = fabs(scale_metric[0]); + scale_metric[1] = fabs(scale_metric[1]); if (scale_metric[0] == Geom::infinity() || scale_metric[1] == Geom::infinity()) { snapped_point.setSnapDistance(std::min(scale_metric[0], scale_metric[1])); } else { -- cgit v1.2.3