From 651b367a2e01f918435d829394baff45537f6b91 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 24 Oct 2013 17:03:01 +0200 Subject: fix bug "some of the locale-based templates cause objects to be resized when default units are changed" #1236257 Fixed bugs: - https://launchpad.net/bugs/1236257 (bzr r12717) --- src/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/file.cpp') diff --git a/src/file.cpp b/src/file.cpp index 8a7b177c0..f978ec66e 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -144,7 +144,7 @@ SPDesktop *sp_file_new(const std::string &templ) // Set viewBox if it doesn't exist if (!doc->getRoot()->viewBox_set) { DocumentUndo::setUndoSensitive(doc, false); - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().quantity, doc->getHeight().quantity)); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); DocumentUndo::setUndoSensitive(doc, true); } -- cgit v1.2.3