Edit layer preferences (per verb-id on command line) don't work
This bug report was converted into a question: question #263157: Edit layer preferences (per verb-id on command line) don't work.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi.
I want to edit layer preferences via command line. For example, this works:
inkscape --verb=LayerShowAll --verb=FileSave --verb=FileClose myfile.svg
inkscape --verb=LayerHideAll --verb=FileSave --verb=FileClose myfile.svg
inkscape --verb=
inkscape --select=layer1 --verb=
But all other commands based on the current selected layer don't work. For example:
inkscape --select=layer1 --verb=LayerToTop --verb=FileSave --verb=FileClose myfile.svg
inkscape --select=layer1 --verb=LayerSolo --verb=FileSave --verb=FileClose myfile.svg
inkscape --select=layer1 --verb=
It seems that the "--select=layer1" don't select the layer with that id.
Changed in inkscape: | |
status: | Incomplete → Invalid |
On 2015-02-07 12:23 (+0100), Lebostein wrote:
> It seems that the "--select=layer1" don't select the layer with that id.
Wrong logic - please try the same steps in Inkscape, using the XML editor, or 'Ctrl+F' (Edit > Find).
If you select a layer group by id, this does not make that group the _current layer_ (its ancestor aka parent group or container element is, however).
If you select a top-level layer by id, the current layer will be 'root' (the root <svg> element), and you can't restack that current layer, since its the only one on that level.
The layer commands (and verbs) work on the _current_ layer - in the GUI you set the current layer either via 'Layers' dialog, or by clicking on an object contained _within_ that layer. So to mimic this via command line, you'd have to try to change the current layer by selecting an object by id from within that layer (I haven't tested myself yet whether this works at all on the command line, since 'current layer' seems to be more of a GUI concept to me, rather than something designed to work via verbs on the command line).