diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-09-20 22:13:00 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-09-20 22:13:00 +0000 |
| commit | 4e8b8beaf879c90d59ef84548b2299151dbfb697 (patch) | |
| tree | a8fbd56311903da5d16ae680107ddded3e6f50bd /src/document.cpp | |
| parent | Fix the text filter issue and revert many changes. (diff) | |
| download | inkscape-4e8b8beaf879c90d59ef84548b2299151dbfb697.tar.gz inkscape-4e8b8beaf879c90d59ef84548b2299151dbfb697.zip | |
Use viewBox for new documents.
Fixed bugs:
- https://launchpad.net/bugs/171203
- https://launchpad.net/bugs/168261
(bzr r12557)
Diffstat (limited to '')
| -rw-r--r-- | src/document.cpp | 5 |
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 |
