diff options
Diffstat (limited to 'src/display/canvas-grid.cpp')
| -rw-r--r-- | src/display/canvas-grid.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 1a284b46e..0a43ed8b7 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -544,6 +544,11 @@ CanvasXYGrid::readRepr() if( root->viewBox_set ) { scale_x = root->width.computed / root->viewBox.width(); scale_y = root->height.computed / root->viewBox.height(); + 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; + scale_y = scale_x; + } } gchar const *value; |
