From 521d45b512a7ad65eb056e0255267619699bbad6 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Sat, 15 Nov 2014 16:09:48 -0500 Subject: in rev 13590, use 'root->height.unit' instead of namedview 'units'. (bzr r13715) --- src/document.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index e5b827937..f5269eab3 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -713,11 +713,9 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins) double const old_height = getHeight().value("px"); Inkscape::Util::Unit const *nv_units = unit_table.getUnit("px"); + if (root->height.unit) + nv_units = unit_table.getUnit(root->height.unit); SPNamedView *nv = sp_document_namedview(this, NULL); - if (nv != NULL) { - if (nv->getAttribute("units")) - nv_units = unit_table.getUnit(nv->getAttribute("units")); - } /* in px */ double margin_top = 0.0; -- cgit v1.2.3