Rearranging XML nodes does not work correctly when changing hierarchy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Create a layer A with three sublayers X, Y and Z. Find A in the XML editor.
The first oddity (which seems like a bug, but probably just weridness in the SVG spec) is that the children of A are Z, Y, X, not X, Y Z as shown in the layers dialog (i.e. Z is the first element, X is the last).
If you try to drag X to above Z, instead, Y and Z switch places. If you try to drag another node from outside of A to above Z, the same happens. Often, these drag attempts simply do nothing - no change, no undo entry, as if you didn't drop it in a valid position, even though the marker indicates the position you dragged it to. This happens every time if X is not present.
The move up/down buttons do rearrange correctly.
description: | updated |
> The first oddity (which seems like a bug, but probably just weridness in the SVG spec)
Layers are implemented as SVG groups, their stack order follows the same rules as z-order in general. For a layer to be listed as _first_ element in the 'Layers...' dialog, its corresponding group element must be drawn as _last_ top level element, i.e. it is near the end of the SVG source file. The XML Editor gives you a view of the SVG or XML structure of the document.
«Elements in an SVG document fragment have an implicit drawing order, with the first elements in the SVG document fragment getting "painted" first. Subsequent elements are painted on top of previously painted elements.» www.w3. org/TR/ SVG11/render. html#RenderingO rder>
<http://