summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/document-properties.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 1b2761b13..0c39876ea 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -31,11 +31,13 @@
#include "inkscape.h"
#include "io/sys.h"
#include "preferences.h"
+#include "shape-editor.h"
#include "sp-namedview.h"
#include "sp-object-repr.h"
#include "sp-root.h"
#include "sp-script.h"
#include "svg/stringstream.h"
+#include "tools-switch.h"
#include "ui/widget/color-picker.h"
#include "ui/widget/scalar-unit.h"
#include "ui/dialog/filedialog.h"
@@ -1658,9 +1660,16 @@ void DocumentProperties::onDocUnitChange()
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) {
+ tools_switch(getDesktop(), TOOLS_SELECT);
+ }
+
// 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);
doc->setModifiedSinceSave();