From 4e8b8beaf879c90d59ef84548b2299151dbfb697 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Fri, 20 Sep 2013 18:13:00 -0400 Subject: Use viewBox for new documents. Fixed bugs: - https://launchpad.net/bugs/171203 - https://launchpad.net/bugs/168261 (bzr r12557) --- src/document.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 967d049c2..5e59a0a0c 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -450,6 +450,11 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, document->setCurrentPersp3DImpl(persp_impl); } + // Set viewBox if it doesn't exist + if (!document->root->viewBox_set) { + document->setViewBox(Geom::Rect::from_xywh(0, 0, document->getWidth().quantity, document->getHeight().quantity)); + } + DocumentUndo::setUndoSensitive(document, true); // reset undo key when selection changes, so that same-key actions on different objects are not coalesced -- cgit v1.2.3