summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-11-24 03:07:36 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-11-24 03:07:36 +0000
commitf12a73dd77175bd6126319f3a698eb16193e7b68 (patch)
treeb5a59803e5bd212f0e355faa029295aa79d47a0e /src/document.cpp
parentUpdate to trunk r13690 (diff)
parentExtensions: try to calculate the SVG unit (diff)
downloadinkscape-f12a73dd77175bd6126319f3a698eb16193e7b68.tar.gz
inkscape-f12a73dd77175bd6126319f3a698eb16193e7b68.zip
Update to trunk r13750
(bzr r13341.5.23)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/document.cpp b/src/document.cpp
index b3d606417..2832536af 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -716,11 +716,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;