summaryrefslogtreecommitdiffstats
path: root/src/display/canvas-grid.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-02-07 17:04:27 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-02-07 17:04:27 +0000
commite1f0d7a8e726072bf8452164fafc8bb037dfebff (patch)
tree7e5c50a03cd0eab373005ba1c49eb0076d011395 /src/display/canvas-grid.cpp
parentupdate to trunk (diff)
parentDistribute autogen.sh. Fixes build on systems that need to reconfigure intltool (diff)
downloadinkscape-e1f0d7a8e726072bf8452164fafc8bb037dfebff.tar.gz
inkscape-e1f0d7a8e726072bf8452164fafc8bb037dfebff.zip
update to trunk
(bzr r13645.1.5)
Diffstat (limited to 'src/display/canvas-grid.cpp')
-rw-r--r--src/display/canvas-grid.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index 0a43ed8b7..0f58096ce 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -547,6 +547,9 @@ CanvasXYGrid::readRepr()
if (Geom::are_near(scale_x / scale_y, 1.0, Geom::EPSILON)) {
// scaling is uniform, try to reduce numerical error
scale_x = (scale_x + scale_y)/2.0;
+ double scale_none = Inkscape::Util::Quantity::convert(1, doc->getDisplayUnit(), "px");
+ if (Geom::are_near(scale_x / scale_none, 1.0, Geom::EPSILON))
+ scale_x = scale_none; // objects are same size, reduce numerical error
scale_y = scale_x;
}
}