summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/document-properties.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-11-03 23:42:23 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-11-03 23:42:23 +0000
commit48ac54f0234671b23afeaad33af6168037ef552c (patch)
tree3a937530c745c958f8da1e788a8dfe94cff847d4 /src/ui/dialog/document-properties.cpp
parentUpdate to trunk (diff)
parentRemove antiquated Perl extensions and modules, which were mostly useless. (diff)
downloadinkscape-48ac54f0234671b23afeaad33af6168037ef552c.tar.gz
inkscape-48ac54f0234671b23afeaad33af6168037ef552c.zip
Update to trunk
(bzr r12588.1.25)
Diffstat (limited to 'src/ui/dialog/document-properties.cpp')
-rw-r--r--src/ui/dialog/document-properties.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 79fb953ac..32f23d55f 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1677,11 +1677,31 @@ void DocumentProperties::onDocUnitChange()
}
// Scale and translate objects
- gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit);
- ShapeEditor::blockSetItem(true);
- doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(0, doc->getHeight().value("px")));
- ShapeEditor::blockSetItem(false);
-
+ // set transform options to scale all things with the transform, so all things scale properly after the viewbox change.
+ /// \todo this "low-level" code of changing viewbox/unit should be moved somewhere else
+
+ // save prefs
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ bool transform_stroke = prefs->getBool("/options/transform/stroke", true);
+ bool transform_rectcorners = prefs->getBool("/options/transform/rectcorners", true);
+ bool transform_pattern = prefs->getBool("/options/transform/pattern", true);
+ bool transform_gradient = prefs->getBool("/options/transform/gradient", true);
+
+ prefs->setBool("/options/transform/stroke", true);
+ prefs->setBool("/options/transform/rectcorners", true);
+ prefs->setBool("/options/transform/pattern", true);
+ prefs->setBool("/options/transform/gradient", true);
+ {
+ ShapeEditor::blockSetItem(true);
+ gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit);
+ doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(0, doc->getHeight().value("px")));
+ ShapeEditor::blockSetItem(false);
+ }
+ prefs->setBool("/options/transform/stroke", transform_stroke);
+ prefs->setBool("/options/transform/rectcorners", transform_rectcorners);
+ prefs->setBool("/options/transform/pattern", transform_pattern);
+ prefs->setBool("/options/transform/gradient", transform_gradient);
+
doc->setModifiedSinceSave();
DocumentUndo::done(doc, SP_VERB_NONE, _("Changed document unit"));