Bug 358422 - Deleted layer content reappears after select.
Summary: Deleted layer content reappears after select.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 3.0 Alpha
Platform: Microsoft Windows Microsoft Windows
: NOR grave
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-23 12:42 UTC by Piotr
Modified: 2016-04-01 14:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Recording of the behaviour (339.75 KB, video/mp4)
2016-01-26 11:36 UTC, Piotr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr 2016-01-23 12:42:12 UTC
After deleting paint layer containig some content, it reappears after selecting something on new layer. One can get rid of it by playing with layers visibility

Reproducible: Always

Steps to Reproduce:
1. Create new file.
2. Create new paint layer (Insert)
3. Draw something on new layer.
4. Delete new layer.
5. Create another layer (layer-2)
6. Draw something on it.
7. Mark some region of drawing (Ctrl+R).

Actual Results:  
Region is marked, but previously deleted layer content shows in background.

Expected Results:  
There shouldn't be this "ghost" of deleted layer.
Comment 1 Halla Rempt 2016-01-23 15:28:00 UTC
Hi Piotr,

Thanks for your report. I haven't been able to reproduce this issue yet. I am wondering whether it's just a display issue; does the regurgitated content also end up when you save? Can you also reproduce this issue when you disable opengl?

Boudewijn
Comment 2 Piotr 2016-01-23 16:07:42 UTC
I checked that this doesn't affect save. Saving and opening again after deleting layer makes this effect go away, also deleted content doesn't appear in saved file. But I was able to reproduce it after disabling opengl in preferences.
Comment 3 Piotr 2016-01-23 16:09:57 UTC
One more thing. As I go through this operations frequently, I'm quite sure it started after update from 2.9.5 to 2.9.10
Comment 4 Halla Rempt 2016-01-23 20:49:50 UTC
Oh, are you on 2.9.10 stable, or the animation beta?
Comment 5 Piotr 2016-01-24 11:06:02 UTC
Stable, I think. Commit hash in about box is 5f2f2b0
Comment 6 Piotr 2016-01-24 11:20:01 UTC
Another detail, this effect occurs only when I try to mark something for the first time on a new layer. Subsequent marks don't show this.
Comment 7 Halla Rempt 2016-01-25 15:34:49 UTC
Hm, that's weird, because the ghosting can be caused by the instant preview feature, which is not in the stable release.
Comment 8 Piotr 2016-01-26 10:58:17 UTC
May it be that published windows build is bad? I don't know how to help further.
Comment 9 Piotr 2016-01-26 11:36:55 UTC
Created attachment 96849 [details]
Recording of the behaviour

Freshly launched app.
Comment 10 Halla Rempt 2016-03-31 18:40:46 UTC
Hi Piotr,

Thanks for you effort. I can see it happen in your video. If this happens every time for you, could you download the 3.0 pre-alpha and see if that still shows the issue? Could you also try to disable opengl in settings/configure krita/display and see if that makes a difference?
Comment 11 Sven Langkamp 2016-03-31 18:58:05 UTC
I can confirm with 3.0 master
Comment 12 Halla Rempt 2016-03-31 18:58:14 UTC
Raghukamath and Sven Langkamp can also reproduce this issue, and I can reproduce it another way: 

20:56:11 < raghukamath> boud you can check it by just creating a layer then draw something and then draw a rectangle selection

this is probably a layer stack update issue.
Comment 13 Raghavendra kamath 2016-03-31 19:05:48 UTC
yes I experience this issue in linux as well in latest 3.0
there is one more way to trigger that update problem

1. open krita
2. add a new paint layer
3. draw something on that new layer
4. then select a portion with rectangle selection

you'll notice all the white area has turned into checker board

a work around is to switch the visibility of bottom most layer on and off , then it doesn't happen again unless you restart krita.

A discussion on IRC - 
boud suggested that this may be a layer stack update issue or may be a miscalculation of bottom layer -
"<boud> that sounds like it's caused by not correctly calculating the bottom layer size, which is empty but has a default color
 <boud> that's something we've been breaking since 2004 "
Comment 14 Dmitry Kazakov 2016-04-01 13:35:40 UTC
Ok, thank you for the report and testing! I can reproduce it in 3.0
Comment 15 Dmitry Kazakov 2016-04-01 14:31:06 UTC
Git commit 82e118f5dbe9b434f2c4453a2fb99d91de06c2ef by Dmitry Kazakov.
Committed on 01/04/2016 at 14:30.
Pushed by dkazakov into branch 'master'.

Fix ghost layer content appearing after creating a new (second) layer

When there is only one layer in the group, the group has no
projection at all. So when adding a layer, which changes the number of
layers from 1 to 2, the stack should be updated to populate the group's
projection.

Fixes T2073

M  +5    -0    libs/image/kis_group_layer.cc
M  +2    -0    libs/image/kis_group_layer.h
M  +5    -0    libs/ui/kis_layer_manager.cc

http://commits.kde.org/krita/82e118f5dbe9b434f2c4453a2fb99d91de06c2ef