From bad0504958a10f1b99db3ae2557305541f388a52 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 24 Nov 2014 20:56:53 +0100 Subject: Units: make it absolutely clear that Document properties unit dropdown is for UI Display Units. Upon document load, calculate the units used for SVG values, if a viewbox is available. If not, default to "px" SVG units. Change all code to use either Display units OR svg units. (bzr r13751) --- src/extension/internal/grid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension/internal/grid.cpp') diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index 0059bbec2..f4e0e5843 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -113,7 +113,7 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc bounding_area = temprec; } - gdouble scale = Inkscape::Util::Quantity::convert(1, "px", (document->doc())->getDefaultUnit()); + gdouble scale = Inkscape::Util::Quantity::convert(1, "px", &document->doc()->getSVGUnit()); bounding_area *= Geom::Scale(scale); Geom::Point spacings( scale * module->get_param_float("xspacing"), scale * module->get_param_float("yspacing") ); -- cgit v1.2.3