diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-04-26 09:46:39 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@M0nst3r.bouyguesbox.fr> | 2015-04-26 09:46:39 +0000 |
| commit | ac6617a55b9f7c05db084eeaa5684fb42d5e1406 (patch) | |
| tree | 1fc8e668890618463d48298074559c7fe6bc5040 /src/sp-namedview.cpp | |
| parent | merge (diff) | |
| parent | extensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff) | |
| download | inkscape-ac6617a55b9f7c05db084eeaa5684fb42d5e1406.tar.gz inkscape-ac6617a55b9f7c05db084eeaa5684fb42d5e1406.zip | |
merging
(bzr r13922.1.13)
Diffstat (limited to 'src/sp-namedview.cpp')
| -rw-r--r-- | src/sp-namedview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index c26eff39f..3154c9e7b 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -261,6 +261,8 @@ void SPNamedView::build(SPDocument *document, Inkscape::XML::Node *repr) { Geom::Rect viewbox = document->getRoot()->viewBox; double factor = svgwidth.value(unit_table.primary(Inkscape::Util::UNIT_TYPE_LINEAR)) / viewbox.width(); svg_units = unit_table.findUnit(factor, Inkscape::Util::UNIT_TYPE_LINEAR); + } else { // force the document units to be px + repr->setAttribute("inkscape:document-units", "px"); } } @@ -551,7 +553,7 @@ void SPNamedView::set(unsigned int key, const gchar* value) { static Inkscape::Util::Unit const *px = unit_table.getUnit("px"); Inkscape::Util::Unit const *new_unit = px; - if (value) { + if (value && document->getRoot()->viewBox_set) { Inkscape::Util::Unit const *const req_unit = unit_table.getUnit(value); if ( !unit_table.hasUnit(value) ) { g_warning("Unrecognized unit `%s'", value); |
