summaryrefslogtreecommitdiffstats
path: root/src/interface.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-09-25 22:56:32 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-09-25 22:56:32 +0000
commit86c5f57796d973a949bf784a2a3decd451670f65 (patch)
tree67ebaebe16b973bbec7bc3b5501dbfcd63477c8c /src/interface.cpp
parentupdate to trunk (diff)
parentC++ify calling a few SPLPEItem functions, much more work than expected... slo... (diff)
downloadinkscape-86c5f57796d973a949bf784a2a3decd451670f65.tar.gz
inkscape-86c5f57796d973a949bf784a2a3decd451670f65.zip
Update to trunk
(bzr r11950.1.148)
Diffstat (limited to 'src/interface.cpp')
-rw-r--r--src/interface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index d18eb8063..e57092e2b 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -50,6 +50,7 @@
#include "sp-gradient.h"
#include "sp-flowtext.h"
#include "sp-namedview.h"
+#include "sp-root.h"
#include "ui/view/view.h"
#include "helper/action.h"
#include "helper/action-context.h"
@@ -321,6 +322,10 @@ sp_ui_close_view(GtkWidget */*widget*/)
if (desktops.size() == 1) {
Glib::ustring templateUri = sp_file_default_template_uri();
SPDocument *doc = SPDocument::createNewDoc( templateUri.c_str() , TRUE, true );
+ // Set viewBox if it doesn't exist
+ if (!doc->getRoot()->viewBox_set) {
+ doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().quantity, doc->getHeight().quantity));
+ }
dt->change_document(doc);
sp_namedview_window_from_document(dt);
sp_namedview_update_layers_from_document(dt);