diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-25 22:56:32 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-25 22:56:32 +0000 |
| commit | 86c5f57796d973a949bf784a2a3decd451670f65 (patch) | |
| tree | 67ebaebe16b973bbec7bc3b5501dbfcd63477c8c /src/extension/internal/gdkpixbuf-input.cpp | |
| parent | update to trunk (diff) | |
| parent | C++ify calling a few SPLPEItem functions, much more work than expected... slo... (diff) | |
| download | inkscape-86c5f57796d973a949bf784a2a3decd451670f65.tar.gz inkscape-86c5f57796d973a949bf784a2a3decd451670f65.zip | |
Update to trunk
(bzr r11950.1.148)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 87cf8a9cc..13267ee2b 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -102,6 +102,12 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) doc->getRoot()->appendChildRepr(image_node); Inkscape::GC::release(image_node); fit_canvas_to_drawing(doc); + + // Set viewBox if it doesn't exist + if (!doc->getRoot()->viewBox_set) { + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().quantity, doc->getHeight().quantity)); + } + // restore undo, as now this document may be shown to the user if a bitmap was opened DocumentUndo::setUndoSensitive(doc, saved); } else { |
