summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 101c54e30..eff6d6e81 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -682,7 +682,7 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins)
margin_units = sp_unit_get_by_abbreviation(units_abbr);
}
if (margin_units == NULL) {
- margin_units = &sp_unit_get_by_id(SP_UNIT_PX);
+ margin_units = &px;
}
margin_top = getMarginLength(nv_repr, "fit-margin-top",
margin_units, &px, w, h, false);