summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-02-23 22:17:37 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-02-23 22:17:37 +0000
commited54c75dc7f31deae37ab89162da9127fb0e3b9a (patch)
treefe5809ff5f17199e7fa773cd47ef877b4a8125d3 /src/file.cpp
parentAdded flexible/fixed to fillet chamfer and fix bugs (diff)
parenton a File->Open, set the viewBox if it did not previously exist, same as was ... (diff)
downloadinkscape-ed54c75dc7f31deae37ab89162da9127fb0e3b9a.tar.gz
inkscape-ed54c75dc7f31deae37ab89162da9127fb0e3b9a.zip
update to trunk
(bzr r13645.1.21)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 72516d776..f9e259fe2 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -288,6 +288,12 @@ bool sp_file_open(const Glib::ustring &uri,
}
if (doc) {
+ // 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().value(doc->getDisplayUnit()), doc->getHeight().value(doc->getDisplayUnit())));
+ DocumentUndo::setUndoSensitive(doc, true);
+ }
SPDocument *existing = desktop ? desktop->getDocument() : NULL;