hide all except selected doesn't work on individual ids
Bug #230498 reported by
jimmac
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..)
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( ).
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_recursive ly() 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.