Bug 405536 - On loading, an image with a clone layer of an invisible layer does not show the clone layer
Summary: On loading, an image with a clone layer of an invisible layer does not show t...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.1.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-16 19:38 UTC by dieter.de.moitie
Modified: 2019-06-17 08:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The drawing with the issue (274.62 KB, application/x-krita)
2019-03-16 19:38 UTC, dieter.de.moitie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dieter.de.moitie 2019-03-16 19:38:47 UTC
Created attachment 118849 [details]
The drawing with the issue

SUMMARY
Krita does not draw a transformed cloned layer when the original is hidden and colorized. The issue occurs after closing and reopening the file. 


STEPS TO REPRODUCE
1/ Create a new paint (or vector) layer
2/ Draw a circle 
3/ Add a colorize mask, fill the circle with a color and make the outside transparent
4/ Select original layer and add a clone layer 
5/ Add a transformation mask to the cloned layer
6/ Move the circle on the cloned layer to a different place
7/ Hide the original layer => Now only the cloned/transformed circle is shown
8/ Save this drawing, close the file and reopen it. => Nothing is shown now
10/ Unhide the orginal layer => Now two circle are shown
11/ Hide the original layer again => We now see again only the cloned/transformed circle

test_clone2.kra attached is my resulting file, which can be used to reproduce this

EXPECTED RESULT
1/ After opening the file, I'd expect the same drawing as when last saved (consistent results).
2/ The cloned circle shown at any time.

WORKAROUND
Select the original layer and add it in a group. Instead of cloning the original layer, clone the group and transform this one.

SOFTWARE/OS VERSIONS
Krita
  Version: 4.1.7.101

Qt
  Version (compiled): 5.11.3
  Version (loaded): 5.11.3

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.20.13-200.fc29.x86_64
  Pretty Productname: Fedora 29 (Workstation Edition)
  Product Type: fedora
  Product Version: 29

OpenGL Info
  **OpenGL not initialized**
Comment 1 Halla Rempt 2019-04-04 09:54:57 UTC
Hi Dieter, 

I can confirm the issue. Thank you for your report.
Comment 2 Dmitry Kazakov 2019-06-13 11:31:10 UTC
Git commit a3ef7b6f273ced29b5059bd40b8f875393bd5d05 by Dmitry Kazakov.
Committed on 13/06/2019 at 11:30.
Pushed by dkazakov into branch 'master'.

Fix rendering of clones, whose source is invisible

We cannot just skip rendering of layers, which has any clones attached,
becasue clones may fetch data from their projections.
Related: bug 408167

M  +3    -3    libs/image/kis_async_merger.cpp
M  +2    -2    libs/image/kis_layer.cc
M  +6    -0    libs/image/kis_projection_leaf.cpp
M  +1    -0    libs/image/kis_projection_leaf.h

https://invent.kde.org/kde/krita/commit/a3ef7b6f273ced29b5059bd40b8f875393bd5d05
Comment 3 Halla Rempt 2019-06-17 08:18:04 UTC
Git commit a1dfff77f420a4045e061b3d1b77bab978bf2ada by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 17/06/2019 at 08:16.
Pushed by rempt into branch 'krita/4.2'.

Fix rendering of clones, whose source is invisible

We cannot just skip rendering of layers, which has any clones attached,
becasue clones may fetch data from their projections.
Related: bug 408167

M  +3    -3    libs/image/kis_async_merger.cpp
M  +2    -2    libs/image/kis_layer.cc
M  +6    -0    libs/image/kis_projection_leaf.cpp
M  +1    -0    libs/image/kis_projection_leaf.h

https://invent.kde.org/kde/krita/commit/a1dfff77f420a4045e061b3d1b77bab978bf2ada