summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <mc@localhost.localdomain>2015-02-23 22:16:39 +0000
committerMarc Jeanmougin <mc@localhost.localdomain>2015-02-23 22:16:39 +0000
commitedf52983916101c08cd2150c935ed2976832ddf0 (patch)
tree552bb1fb32a634b40e1daa8b8e4c452f138752b3 /src/file.cpp
parentRemoved eclipse files, added removed pot file (diff)
parenton a File->Open, set the viewBox if it did not previously exist, same as was ... (diff)
downloadinkscape-edf52983916101c08cd2150c935ed2976832ddf0.tar.gz
inkscape-edf52983916101c08cd2150c935ed2976832ddf0.zip
Merge, resolved conflicts
(bzr r13922.1.8)
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 f9dbe00a7..f33e284b2 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;