diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-11-24 03:07:36 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-11-24 03:07:36 +0000 |
| commit | f12a73dd77175bd6126319f3a698eb16193e7b68 (patch) | |
| tree | b5a59803e5bd212f0e355faa029295aa79d47a0e /src/document.cpp | |
| parent | Update to trunk r13690 (diff) | |
| parent | Extensions: try to calculate the SVG unit (diff) | |
| download | inkscape-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.cpp | 6 |
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; |
