diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-15 21:57:03 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-15 21:57:03 +0000 |
| commit | 6bd1c2a30b66e15fe055b22bd47dadb771f7fae2 (patch) | |
| tree | 1b991cc2736f84fb069666802d485bd29cff6394 /src/file.cpp | |
| parent | Update to limit options to radius = 0, radious > 0 or both (diff) | |
| parent | fix-bug-1557192. paint-order crash with multiple items (diff) | |
| download | inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.tar.gz inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.zip | |
Update to trunk
(bzr r13645.1.119)
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/file.cpp b/src/file.cpp index 7ae7d238a..9d390908e 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -142,7 +142,9 @@ SPDesktop *sp_file_new(const std::string &templ) } // Set viewBox if it doesn't exist - if (!doc->getRoot()->viewBox_set) { + if (!doc->getRoot()->viewBox_set + && (doc->getRoot()->width.unit != SVGLength::PERCENT) + && (doc->getRoot()->height.unit != SVGLength::PERCENT)) { 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); @@ -289,7 +291,9 @@ bool sp_file_open(const Glib::ustring &uri, if (doc) { // Set viewBox if it doesn't exist - if (!doc->getRoot()->viewBox_set) { + if (!doc->getRoot()->viewBox_set + && (doc->getRoot()->width.unit != SVGLength::PERCENT) + && (doc->getRoot()->height.unit != SVGLength::PERCENT)) { 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); |
