Bug 392437

Summary: [Selection] Deselect can kill all your layers, one by one
Product: [Applications] krita Reporter: David REVOY <info>
Component: GeneralAssignee: joupent
Status: RESOLVED FIXED    
Severity: critical CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: [^ quick MP4 video of the bug ]

Description David REVOY 2018-03-28 06:13:13 UTC
Created attachment 111691 [details]
[^ quick MP4 video of the bug ]

Hi, 
A pretty dangerous bug: Select > Deselect (triggered by menu or by shortcut) kill layers one by one. I attached a video; the bug can even kill all the layer stack and prevent user to add a new layer. 

To reproduce:
=============
1. Create four or five layers
2. Select something on the canvas
3. Deselect

Result:
=======
The bottom layer disappear of the layerstack. If you repeat the operation you can remove all layers.

(Note: Since Krita 4.0 release, I kept using the same build; so this behavior is something I discovered this morning after building git~master, I'll obviously build a previous version or use 4.0 appimage; this bug is too critical for painting today)
Comment 1 Halla Rempt 2018-03-28 08:14:46 UTC
This bug originates in the reference tool patch. I've reverted the patch. Jouni, can you fix this in the branch? Then we can look at how we can better merge the branch to master.
Comment 2 Halla Rempt 2018-03-28 11:53:38 UTC
commit c11eac4885226751139329cd2da57b4ba4d94312 (HEAD -> rempt/intel-3, origin/rempt/intel-3)
Author: Jouni Pentikäinen <joupent@gmail.com>
Date:   Wed Mar 28 14:06:22 2018 +0300

    Fix layers disappearing from layer box when deselecting