diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-02-19 10:48:41 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-02-19 10:48:41 +0000 |
| commit | f15ac06ffd9cc8dbb098b18a6b273b32fc904fc9 (patch) | |
| tree | 482bc967d7e637d3f8817aa2074362a461465603 /src/ui/dialog/document-properties.cpp | |
| parent | update to trunk (diff) | |
| parent | Add SVG2 property 'paint-order'. (diff) | |
| download | inkscape-f15ac06ffd9cc8dbb098b18a6b273b32fc904fc9.tar.gz inkscape-f15ac06ffd9cc8dbb098b18a6b273b32fc904fc9.zip | |
update to trunk
(bzr r11950.1.254)
Diffstat (limited to 'src/ui/dialog/document-properties.cpp')
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index d324d2d1b..d344fb1d6 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1703,9 +1703,14 @@ void DocumentProperties::onDocUnitChange() repr->setAttribute("inkscape:document-units", os.str().c_str()); // Set viewBox - Inkscape::Util::Quantity width = doc->getWidth(); - Inkscape::Util::Quantity height = doc->getHeight(); - doc->setViewBox(Geom::Rect::from_xywh(0, 0, width.value(doc_unit), height.value(doc_unit))); + if (doc->getRoot()->viewBox_set) { + gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit); + doc->setViewBox(doc->getRoot()->viewBox*Geom::Scale(scale)); + } else { + Inkscape::Util::Quantity width = doc->getWidth(); + Inkscape::Util::Quantity height = doc->getHeight(); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, width.value(doc_unit), height.value(doc_unit))); + } // TODO: Fix bug in nodes tool instead of switching away from it if (tools_active(getDesktop()) == TOOLS_NODES) { |
