diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-10-27 16:25:28 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-10-27 16:25:28 +0000 |
| commit | cddc1afecc0e701f4bae66d64435d3586ecf4bdb (patch) | |
| tree | 5d782dab98c6656d5b6f0bf0c0d2eb233e732d5a /src | |
| parent | reduce the amount of cmdline output from btool, make it easier to see compile... (diff) | |
| download | inkscape-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.cpp | 9 | ||||
| -rw-r--r-- | src/extension/internal/wmf-inout.cpp | 9 |
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); } |
