diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-02 22:48:49 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-02 22:48:49 +0000 |
| commit | b1fd9e5520ba0578f3b1dbfa53a806bfdb74f3a3 (patch) | |
| tree | cacb602e37499ebb99f1bfd76268a15adcc4e944 /src/document.cpp | |
| parent | Adjust dock size to minimum width during canvas table size allocation signal. (diff) | |
| download | inkscape-b1fd9e5520ba0578f3b1dbfa53a806bfdb74f3a3.tar.gz inkscape-b1fd9e5520ba0578f3b1dbfa53a806bfdb74f3a3.zip | |
Doc rotate start
(bzr r15142.1.1)
Diffstat (limited to '')
| -rw-r--r-- | src/document.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/document.cpp b/src/document.cpp index 920e47cb8..a371fe1e5 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -386,6 +386,7 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, if (!bordercolor.empty()) { rnew->setAttribute("bordercolor", bordercolor.data()); } + sp_repr_set_svg_double(rnew, "inkscape:document-rotation", 0.); sp_repr_set_svg_double(rnew, "borderopacity", prefs->getDouble("/template/base/borderopacity", 1.0)); sp_repr_set_svg_double(rnew, "objecttolerance", @@ -407,6 +408,11 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc, rroot->addChild(rnew, NULL); // clean up Inkscape::GC::release(rnew); + } else { + Inkscape::XML::Node *nv_repr = sp_item_group_get_child_by_name(document->root, NULL, "sodipodi:namedview")->getRepr(); + if (!nv_repr->attribute("inkscape:document-rotation")) { + sp_repr_set_svg_double(nv_repr, "inkscape:document-rotation", 0.); + } } // Defs |
