summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-10-27 16:25:28 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-10-27 16:25:28 +0000
commitcddc1afecc0e701f4bae66d64435d3586ecf4bdb (patch)
tree5d782dab98c6656d5b6f0bf0c0d2eb233e732d5a /src
parentreduce the amount of cmdline output from btool, make it easier to see compile... (diff)
downloadinkscape-cddc1afecc0e701f4bae66d64435d3586ecf4bdb.tar.gz
inkscape-cddc1afecc0e701f4bae66d64435d3586ecf4bdb.zip
fix crash, partly fix vertical positioning issue. couldn't figure out how to make it work, the applied scale transform works weird somehow
Fixed bugs: - https://launchpad.net/bugs/1244793 (bzr r12732)
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);
}