summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-09-22 16:53:57 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-09-22 16:53:57 +0000
commit8cf510753057485dcf07a5ad4587ffe8c7f7eaa2 (patch)
tree26df259064bee700c6a44df885a990ada2a15612 /src/document.cpp
parentUpdate to trunk (diff)
parentFix CMake build (follow-up to r12567) (diff)
downloadinkscape-8cf510753057485dcf07a5ad4587ffe8c7f7eaa2.tar.gz
inkscape-8cf510753057485dcf07a5ad4587ffe8c7f7eaa2.zip
update to trunk
(bzr r11950.1.147)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp5
1 files changed, 5 insertions, 0 deletions
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