From 6c4685e18a2672ceb73c6f5d0bd03914ffa746f9 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Mon, 24 Nov 2014 18:22:58 -0500 Subject: fix bug in rev 13632 when page size units = 'm'. (Bug 1395637) Fixed bugs: - https://launchpad.net/bugs/1395637 (bzr r13753) --- src/document.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 3715d8e6e..f69e830ff 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -636,6 +636,7 @@ void SPDocument::setWidth(const Inkscape::Util::Quantity &width) if (*width.unit == *unit_table.getUnit("m")) { root->width.value = width.value("cm"); root->width.unit = SVGLength::CM; + old_converted = Inkscape::Util::Quantity::convert(old_converted, "m", "cm"); } else { root->width.value = width.quantity; root->width.unit = (SVGLength::Unit) width.unit->svgUnit(); @@ -677,6 +678,7 @@ void SPDocument::setHeight(const Inkscape::Util::Quantity &height) if (*height.unit == *unit_table.getUnit("m")) { root->height.value = height.value("cm"); root->height.unit = SVGLength::CM; + old_converted = Inkscape::Util::Quantity::convert(old_converted, "m", "cm"); } else { root->height.value = height.quantity; root->height.unit = (SVGLength::Unit) height.unit->svgUnit(); -- cgit v1.2.3