summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2014-11-15 21:09:48 +0000
committerapenner <penner@vaxxine.com>2014-11-15 21:09:48 +0000
commit521d45b512a7ad65eb056e0255267619699bbad6 (patch)
tree6385b976203c0602128bf155612aae7cd0eb024a /src/document.cpp
parentUpdate Chamfer Steps to more unequivocal number, thanks to the feedback of Iv... (diff)
downloadinkscape-521d45b512a7ad65eb056e0255267619699bbad6.tar.gz
inkscape-521d45b512a7ad65eb056e0255267619699bbad6.zip
in rev 13590, use 'root->height.unit' instead of namedview 'units'.
(bzr r13715)
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 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;