hide all except selected doesn't work on individual ids

Bug #230498 reported by jimmac
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
Unassigned

Bug Description

I'm not sure what the suggested use case is, but for me the export by id + hide all but selected is most useful to chop up a mockup into individual parts using groups. Currently, when you do this, overlaid objects done't get exported id by id, but are always overlaid. To reproduce:

Create a rectangle with id=rectangle, and on top a circle id=circle. Select all, export by id, hide all but selected. You will get rectangle.png with a circle+rectnagle. and a circle.png with a circle on a background (the rectangle).

I would have expected having the two files exported one by one (rectangle.png only having the id=rectangle exported, everything else hidden, and so on..)

Revision history for this message
Mark Burton (mj-burton) wrote :

The problem that causes this is in the file export.cpp in the function sp_export_export_clicked (GtkButton */*button*/, GtkObject *base).

The issue is in the funciton call to sp_export_png_file().

                    if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), fn,
                                             *area, width, height, dpi, dpi,
                                             nv->pagecolor,
                                             NULL, NULL, TRUE, // overwrite without asking
                                             hide ? (GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList() : NULL
                            )) {

In the case when "hide" is set to true, the complete list of selected items is passed to this funciton, when in fact only the object being redered to file should be passed. The comment in the funciton header for hide_other_items_recursively() confirms this (see file pixbuff-ops.cpp). Its says:-

"Hide all items that are not listed in list, recursively, skipping groups and defs."

I made a quick fix, and convinced myself this works. The same error appears later on in the same funciton, but for non-batch export.

This whole batch export routine could really do with some more thought. The way *hints* are used for dpi and export filename in a way that the user cannot easily recognise and understand does not give the best user experience.

Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Ubuntu 9.10, Inkscape 0.47pre4 and r8862 (Dec 29 2009).

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
tags: added: exporting
su_v (suv-lp)
tags: added: bitmap
Revision history for this message
jazzynico (jazzynico) wrote :

No progress with Inkscape trunk revision 13156 on Windows XP.

Changed in inkscape:
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.