summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-11-22 18:39:28 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-11-22 18:39:28 +0000
commit72c8a18f31440131537b9da03177bddf5d57bee2 (patch)
tree2e66949101a49c8e60cfb6eca93f8155161042b8
parentWin64: add High DPI awareness to the manifest (needs testing on non-highdpi s... (diff)
downloadinkscape-72c8a18f31440131537b9da03177bddf5d57bee2.tar.gz
inkscape-72c8a18f31440131537b9da03177bddf5d57bee2.zip
Revert old behavior: changing "Default units" changes *only* the displayed units. It should not change the units used in SVG. We will need to create another setting for that at some later point.
(bzr r13748)
-rw-r--r--src/attributes.cpp2
-rw-r--r--src/ui/dialog/document-properties.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp
index d142d1a06..2b04843a7 100644
--- a/src/attributes.cpp
+++ b/src/attributes.cpp
@@ -115,7 +115,7 @@ static SPStyleProp const props[] = {
{SP_ATTR_INKSCAPE_SNAP_BBOX_CORNER, "inkscape:bbox-nodes"},
{SP_ATTR_INKSCAPE_SNAP_PAGE_BORDER, "inkscape:snap-page"},
{SP_ATTR_INKSCAPE_CURRENT_LAYER, "inkscape:current-layer"},
- {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"},
+ {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"}, // This setting sets the Display units, *not* the units used in SVG
{SP_ATTR_UNITS, "units"},
{SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"},
/* SPColorProfile */
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index e6dfee81d..9ab607ed2 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -114,7 +114,7 @@ DocumentProperties::DocumentProperties()
_rcb_shad(_("_Show border shadow"), _("If set, page border shows a shadow on its right and lower side"), "inkscape:showpageshadow", _wr, false),
_rcp_bg(_("Back_ground color:"), _("Background color"), _("Color of the page background. Note: transparency setting ignored while editing but used when exporting to bitmap."), "pagecolor", "inkscape:pageopacity", _wr),
_rcp_bord(_("Border _color:"), _("Page border color"), _("Color of the page border"), "bordercolor", "borderopacity", _wr),
- _rum_deflt(_("Document _units:"), "inkscape:document-units", _wr),
+ _rum_deflt(_("Display _units:"), "inkscape:document-units", _wr),
_page_sizer(_wr),
//---------------------------------------------------------------
//General snap options
@@ -1708,7 +1708,10 @@ void DocumentProperties::onDocUnitChange()
Inkscape::SVGOStringStream os;
os << doc_unit->abbr;
repr->setAttribute("inkscape:document-units", os.str().c_str());
-
+
+ // Disable changing of SVG Units. The intent here is to change the units in the UI, not the units in SVG.
+ // This code should be moved (and fixed) once we have an "SVG Units" setting that sets what units are used in SVG data.
+#if 0
// Set viewBox
if (doc->getRoot()->viewBox_set) {
gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit);
@@ -1760,10 +1763,11 @@ void DocumentProperties::onDocUnitChange()
prefs->setBool("/options/transform/rectcorners", transform_rectcorners);
prefs->setBool("/options/transform/pattern", transform_pattern);
prefs->setBool("/options/transform/gradient", transform_gradient);
+#endif
doc->setModifiedSinceSave();
- DocumentUndo::done(doc, SP_VERB_NONE, _("Changed document unit"));
+ DocumentUndo::done(doc, SP_VERB_NONE, _("Changed default display unit"));
}
} // namespace Dialog