Bug 343807 - "Fill layers" without a selection, lose their pattern or color at the reopening + artifacts by toggling visibility
Summary: "Fill layers" without a selection, lose their pattern or color at the reopeni...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 2.9 Beta
Platform: Ubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2015-02-05 11:01 UTC by mvowada
Modified: 2015-02-17 16:55 UTC (History)
1 user (show)

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


Attachments
"Fill layers" without a selection, lose their pattern or color at the reopening + artifacts by toggling visibility - Video (1.25 MB, video/mp4)
2015-02-05 11:03 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2015-02-05 11:01:48 UTC
By inspecting how fill layers behave with and without a selection, I think I've stumbled in two different issues (please, refer also to the video in the comment below for a better grasp).

What I've noticed so far, is that by opening a document with multiple Fill layers (say: full vs. selection, pattern vs. color):

a. "Fill layers" which were created without adding a selection, tend to lose their patterns or color. Here, they are reset into a colored blue (in case they are "colored" Fill layer) or into the first pattern sample in the list (if "pattern" Fill layers).

b. "Fill layers" with "pattern" are not correctly displayed in the layer stack when toggling their visibility, once they've been created (this happens without the need to reopen a document) .

Reproducible: Always

Steps to Reproduce:
1. new document
2. create multiple "Fill layers" both "pattern" and "color", by using different samples
3. save and close the document

Actual Results:  
a. here, by reopening the document, Fill layers are reset to a default pattern/color.
b. Also, by toggling hiding/showing Fill layers in the stack, they arise display problems like artifacts (see video in attachment here below).

Expected Results:  
a. Fill layers created without a selection should retain the chosen pattern/color
b. Should be possible to toggle visibility of Fill layers without the arising of screen artifacts
Comment 1 mvowada 2015-02-05 11:03:07 UTC
Created attachment 90920 [details]
"Fill layers" without a selection, lose their pattern or color at the reopening + artifacts by toggling visibility - Video
Comment 2 mvowada 2015-02-05 12:27:59 UTC
[quote]or into the first pattern sample in the list (if "pattern" Fill layers)[/quote]

...sorry, it seems it is the pattern named "Grid01" the default pattern into which a pattern "Fill layer" (without selection) is reset once the document is reopened. Not the first in the sample list as I've erroneously stated in my report.
Comment 3 Halla Rempt 2015-02-06 09:57:01 UTC
Even before saving, I see that not the whole stack is updated.
Comment 4 Halla Rempt 2015-02-06 09:58:31 UTC
And I can confirm the loading problems as well.
Comment 5 Halla Rempt 2015-02-06 10:02:31 UTC
As soon as there's a fill layer in the stack with a selection, updates seem to get limited to that selection; if there is more than one, it seems only the intersection gets updated when toggling the visibility of any layer.
Comment 6 Dmitry Kazakov 2015-02-17 14:50:52 UTC
Git commit e6d2f1554477ea3d854b53e2b32784a74a62d80f by Dmitry Kazakov.
Committed on 17/02/2015 at 14:13.
Pushed by dkazakov into branch 'calligra/2.9'.

Fixed bugs in generator layer

1) Regenerate generator cache on loading
2) Regenerate generator cache on every change of the fill layer selection.
   It is done in a deferred fashion using KisSignalCompressor.

M  +1    -0    krita/image/CMakeLists.txt
M  +58   -2    krita/image/generator/kis_generator_layer.cpp
M  +15   -1    krita/image/generator/kis_generator_layer.h
A  +49   -0    krita/image/kis_recalculate_generator_layer_job.cpp     [License: GPL (v2+)]
A  +38   -0    krita/image/kis_recalculate_generator_layer_job.h     [License: GPL (v2+)]
M  +1    -0    krita/ui/kra/kis_kra_load_visitor.cpp

http://commits.kde.org/calligra/e6d2f1554477ea3d854b53e2b32784a74a62d80f
Comment 7 Dmitry Kazakov 2015-02-17 14:50:53 UTC
Git commit f100c3a7b665207e8290a9be72fab3a496d1caf3 by Dmitry Kazakov.
Committed on 17/02/2015 at 14:40.
Pushed by dkazakov into branch 'calligra/2.9'.

Added unittests for fill layer loading

M  +87   -86   krita/image/tests/kis_transform_mask_test.cpp
M  +41   -0    krita/sdk/tests/testutil.h
M  +18   -21   krita/ui/tests/kis_file_layer_test.cpp
M  +71   -0    krita/ui/tests/kis_kra_saver_test.cpp
M  +2    -0    krita/ui/tests/kis_kra_saver_test.h

http://commits.kde.org/calligra/f100c3a7b665207e8290a9be72fab3a496d1caf3
Comment 8 mvowada 2015-02-17 16:55:56 UTC
All is working well now. Thank you!