diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-11-06 15:33:01 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-11-06 15:33:01 +0000 |
| commit | 68c305f169dfe9a273e29dd2aa587f0d59071483 (patch) | |
| tree | 19a923f03230794f9d064b4d4fddf2edcdc83a31 /src/main.cpp | |
| parent | Minor tweak (diff) | |
| download | inkscape-68c305f169dfe9a273e29dd2aa587f0d59071483.tar.gz inkscape-68c305f169dfe9a273e29dd2aa587f0d59071483.zip | |
further cppification
Fixed bugs:
- https://launchpad.net/bugs/1306662
(bzr r15218)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 0d5f35797..95764aea9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -119,6 +119,7 @@ #include "verbs.h" #include "path-chemistry.h" +#include "object-set.h" #include "sp-text.h" #include "sp-flowtext.h" #include "text-editing.h" @@ -1161,16 +1162,13 @@ static int sp_process_file_list(GSList *fl) // "crop" the document to the specified object, cleaning as we go. SPObject *obj = doc->getObjectById(sp_export_id); - Geom::OptRect const bbox(SP_ITEM(obj)->visualBounds()); - - if (bbox) { - doc->fitToRect(*bbox, false); - } - if (sp_export_id_only) { // If -j then remove all other objects to complete the "crop" doc->getRoot()->cropToObject(obj); } + Inkscape::ObjectSet s(doc); + s.set(obj); + s.fitCanvas(false); } Inkscape::Extension::save(Inkscape::Extension::db.get("org.inkscape.output.svg.plain"), doc, sp_export_svg, false, |
