Bug 402633

Summary: Wrong layer numeration after deleting middle one.
Product: [Applications] krita Reporter: n0dwis <n0dwis>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: freebox64, halla
Priority: NOR    
Version First Reported In: 4.1.7   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description n0dwis 2018-12-28 07:49:42 UTC
SUMMARY
Wrong layer numeration after deleting middle one.

STEPS TO REPRODUCE
1. Create new document
2. Add "Layer 3"
3. Delete "Layer 2"
4. Save and close document
5. Open document
6. Add layer.

OBSERVED RESULT
New layer name is "Layer 3"

EXPECTED RESULT
New layer name should be "Layer 4"

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 mvowada 2018-12-29 12:33:10 UTC
Hi. I think it might be useful to know the reasons for changing how layers are named by default.
Comment 2 n0dwis 2018-12-31 13:32:39 UTC
(In reply to mvowada from comment #1)
> Hi. I think it might be useful to know the reasons for changing how layers
> are named by default.

I don't understand. I think, layer number should just increase every time when it adding.
Comment 3 Bug Janitor Service 2019-01-01 03:44:31 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 4 Halla Rempt 2019-01-06 10:58:48 UTC
The number starts from the number of layers in the image when reloading the image, not the last used number. Theoretically, we could save the state of the layer numbering, but only to .kra files, and then we'd have an inconsistency with other file types. I think we'll keep it this ways.
Comment 5 n0dwis 2019-01-08 07:33:39 UTC
(In reply to Boudewijn Rempt from comment #4)
> The number starts from the number of layers in the image

I understand. This is not really important thing. I worry about some kind of layers conflicts because of it names. 

Thank you.
Comment 6 Halla Rempt 2019-01-08 09:43:24 UTC
Layers have an internal unique id, so having more than one layer with the same name isn't going to confuse Krita.