summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/emf-inout.cpp9
-rw-r--r--src/extension/internal/wmf-inout.cpp9
2 files changed, 8 insertions, 10 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp
index 36d7ca145..67f90da91 100644
--- a/src/extension/internal/emf-inout.cpp
+++ b/src/extension/internal/emf-inout.cpp
@@ -3511,15 +3511,14 @@ Emf::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
// Set viewBox
doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc_unit), doc->getHeight().value(doc_unit)));
+ doc->ensureUpToDate();
// Scale and translate objects
- double scale = Inkscape::Util::Quantity::convert(1, "px", doc->getWidth().unit);
+ double scale = Inkscape::Util::Quantity::convert(1, "px", doc_unit);
ShapeEditor::blockSetItem(true);
- doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(0, SP_ACTIVE_DOCUMENT->getHeight().value("px")));
+ doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(0, doc->getHeight().value("px")));
ShapeEditor::blockSetItem(false);
-
- doc->ensureUpToDate();
-
+
Inkscape::DocumentUndo::setUndoSensitive(doc, saved);
}
diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp
index 2c6fd9e52..e0e50cc03 100644
--- a/src/extension/internal/wmf-inout.cpp
+++ b/src/extension/internal/wmf-inout.cpp
@@ -3196,15 +3196,14 @@ Wmf::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
// Set viewBox
doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc_unit), doc->getHeight().value(doc_unit)));
-
+ doc->ensureUpToDate();
+
// Scale and translate objects
- double scale = Inkscape::Util::Quantity::convert(1, "px", doc->getWidth().unit);
+ double scale = Inkscape::Util::Quantity::convert(1, "px", doc_unit);
ShapeEditor::blockSetItem(true);
doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(0, doc->getHeight().value("px")));
ShapeEditor::blockSetItem(false);
-
- doc->ensureUpToDate();
-
+
Inkscape::DocumentUndo::setUndoSensitive(doc, saved);
}