diff options
| author | Aaron Spike <aaron@ekips.org> | 2006-03-26 19:19:01 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2006-03-26 19:19:01 +0000 |
| commit | f8285e6ba33d8996701e52c6260dcf6ab668905b (patch) | |
| tree | 937d8f920bfdc5b754dffa9dcb605669ababfd04 /src/main.cpp | |
| parent | better explanation of --export-area-canvas (diff) | |
| download | inkscape-f8285e6ba33d8996701e52c6260dcf6ab668905b.tar.gz inkscape-f8285e6ba33d8996701e52c6260dcf6ab668905b.zip | |
clarify case for --export-id and --export-drawing
(bzr r302)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index fdfa3aa7b..3c3655175 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -778,19 +778,18 @@ sp_do_export_png(SPDocument *doc) if (sp_export_id || sp_export_area_drawing) { SPObject *o = NULL; - if (sp_export_id) { + SPObject *o_area = NULL; + if (sp_export_id && sp_export_area_drawing) { + o = doc->getObjectById(sp_export_id); + o_area = SP_DOCUMENT_ROOT (doc); + } else if (sp_export_id) { o = doc->getObjectById(sp_export_id); + o_area = o; } else if (sp_export_area_drawing) { o = SP_DOCUMENT_ROOT (doc); + o_area = o; } - SPObject *o_area = NULL; - if (sp_export_area_drawing) { - o_area = SP_DOCUMENT_ROOT (doc); - } else if (sp_export_id) { - o_area = doc->getObjectById(sp_export_id); - } - if (o) { if (!SP_IS_ITEM (o)) { g_warning("Object with id=\"%s\" is not a visible item. Nothing exported.", sp_export_id); |
