diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2014-08-26 08:44:06 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2014-08-26 08:44:06 +0000 |
| commit | 84632bca5511a1daae902bbd9faad00d67fd58bf (patch) | |
| tree | 2dd483c8d5c7411b9cbac3b263f3f77f86d37c38 /src/seltrans.cpp | |
| parent | librevenge: update to latest patch from bug #1323592 (support old and new ver... (diff) | |
| parent | UI. Fix for Bug #340723 "Interface inconsistency of tooltips". (diff) | |
| download | inkscape-84632bca5511a1daae902bbd9faad00d67fd58bf.tar.gz inkscape-84632bca5511a1daae902bbd9faad00d67fd58bf.zip | |
update to trunk (r13532)
(bzr r13398.1.8)
Diffstat (limited to 'src/seltrans.cpp')
| -rw-r--r-- | src/seltrans.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 6b8cd19bb..e15249f94 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -9,7 +9,7 @@ * Abhishek Sharma * * Copyright (C) 1999-2002 Lauris Kaplinski - * Copyright (C) 1999-2008 Authors + * Copyright (C) 1999-2014 Authors * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -1109,10 +1109,17 @@ gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, Geom::P break; } + // _point and _origin are noisy, ranging from 1 to 1e-9 or even smaller; this is due to the + // limited SVG output precision, which can be arbitrarily set in the preferences Geom::Point const initial_delta = _point - _origin; - if (fabs(initial_delta[dim_a]) < 1e-15) { - return false; + // The handle and the origin shouldn't be too close to each other; let's check for that! + // Due to the limited resolution though (see above), we'd better use a relative error here + if (_bbox) { + Geom::Coord d = (*_bbox).dimensions()[dim_a]; + if (fabs(initial_delta[dim_a]/d) < 1e-4) { + return false; + } } // Calculate the scale factors, which can be either visual or geometric |
