When adding a new layer, current layer name is duplicated with the addition of '1'

Bug #1407780 reported by rickmastfan67
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

Inkscape 0.91pre3 r13670 win64
Windows 7 x64

I don't know if this is intentional for 0.91, but I thought I'd report it as a bug just in case. I did notice that if you're just letting Inkscape name the layers, you get 'Layer 1' (base layer), Layer 2, Layer 3, ect.. I do know in Inkscape 0.48.5, the default name was always 'Layer'.

Steps to reproduce:
1. Start Inkscape with a fresh profile.
2. Layer > Add layer
3. Notice that the default name for the next new layer is 'Layer 2'. (generating that based on the default Inkscape layer being 'Layer 1')
4. Name the new layer as "-base".
5. Repeat Step #2.

What should happen:
The next new layer default name should be 'Layer 3' since this would be the third layer in the file.

What happens:
The next new layer default name is '-base 1'.

It seems that Inkscape is now using the currently selected layer to generate the name for the next new layer no matter what it's named. I think a better way would be to generate the default name for the new layer off the layer 'id' instead. So, if the next layer id is 'id=layer4', then the default name would be "Layer 4" till the user changes it themselves. That makes it easier for the end user to keep track of how many layers they have in the file without having the count them (especially if they have 25+) since there's no way to count them unless you did it manually. Heck, it might even simplify some of the code.

Tags: layers ui
description: updated
Revision history for this message
su_v (suv-lp) wrote :

It is intentional AFAIU, see discussion in bug #1019974 (and comment 7 for the final commit): the current layer name is used for the new layer, not a generic 'Layer' name which might exist in the current file or not: the user is free to rename any layer (other languages use a translated label for the initial layer in the default template), and layer names do not have to be identical to the layer id (which is much more restrictive with regard to the allowed set of characters (e.g. no spaces or special characters).

<quote>
A "unique layer name" is made by substituting or appending the current layers number suffix with the next unique larger number suffix not already used for any layer name.
</quote>

tags: added: layers
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.