Bug 343699 - Layer Preview thumbnails do not update until cursor hovers over the Layers Docker
Summary: Layer Preview thumbnails do not update until cursor hovers over the Layers Do...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-02 15:10 UTC by Tyson Tan
Modified: 2015-02-06 15:19 UTC (History)
2 users (show)

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


Attachments
patch to enable immediate thumbnail updates (3.84 KB, patch)
2015-02-06 13:22 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2015-02-02 15:10:10 UTC
Krita's Layer Preview thumbnail in Layers Docker does not update to reflect my recent my actions until I hover the cursor over the Layers Docker. By "Preview" I didn't mean the hover popup preview but the small thumbnail that always displayed in the Docker's left column. There are exceptions – Filling and Transformation seemed to trigger the re-generation of the thumbnail once the operation is finished.

This problem as been there for a while, Boud reminded me about it in Bug 343685, so I decided to report it as well.

Reproducible: Always

Steps to Reproduce:
1. Create a new document;
2. Brush >> Fill_circle preset >> Enlarge brush size >> Pure Red (so it is more visible);
3. Draw something >> The Layers Docker's thumbnails do not update;
4. Move the cursor over the Layers docker >> The thumbnails get re-generated.

Actual Results:  
Layer Preview thumbnails do not update until cursor hovers over the Layers Docker.

Expected Results:  
The thumbnails automatically updates to refelct recent change. If real-time refreshing is too taxing, do it once per 5-10 seconds or 5-10 steps, at least.
Comment 1 Halla Rempt 2015-02-02 18:38:55 UTC
Hm, the speed with which the thumbnail is painted when hovering over the layer box suggests that we do the thumbnail updating in a timeley fashion but that somehow the widget isn't redrawn.
Comment 2 Halla Rempt 2015-02-06 12:04:16 UTC
This was already the case in 2.8, I see.
Comment 3 Halla Rempt 2015-02-06 12:20:14 UTC
And 2.7
Comment 4 Halla Rempt 2015-02-06 12:32:31 UTC
And 2.6. But interestingly, it's not just hovering over the layerbox that updates the previews, it's also when a dialog or message box pops up.
Comment 5 Halla Rempt 2015-02-06 13:22:28 UTC
Created attachment 90941 [details]
patch to enable immediate thumbnail updates

This patch needs testing... It updates the thumbnail as you go. Here it doesn't seem to cause any performance regression, not even big images. I had another patch that would introduce a timed delay, but that made Krita deadlock all the time.
Comment 6 Tyson Tan 2015-02-06 14:02:54 UTC
Thank you for the patch. It seems to be working fine. I will keep my build static for a while to test it out.

The preview updates the previous change when I begin a new action. Is that correct?
Comment 7 Halla Rempt 2015-02-06 14:17:11 UTC
It depends a bit, painting gets updated when you end the stroke, but handling vector shapes causes immediate updates.
Comment 8 wolthera 2015-02-06 14:49:08 UTC
boud, unfortunately it does give me a slight performance regression. The tiles don't update as nicely as they should.

Either make it optional(we have an entry for layer-thumbnails already), or discard it.
Comment 9 Halla Rempt 2015-02-06 15:16:38 UTC
Git commit 65cfc79e83061aa9863a47e8a2641e750ee2cea2 by Boudewijn Rempt.
Committed on 06/02/2015 at 13:49.
Pushed by rempt into branch 'calligra/2.9'.

M  +10   -3    krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
M  +3    -1    krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h
M  +5    -0    krita/ui/KisDocumentSectionView.cpp
M  +1    -0    krita/ui/KisDocumentSectionView.h

http://commits.kde.org/calligra/65cfc79e83061aa9863a47e8a2641e750ee2cea2
Comment 10 Halla Rempt 2015-02-06 15:19:20 UTC
Git commit 75e35fbcd90b33a2df5d2c9276dd20db798f94db by Boudewijn Rempt.
Committed on 06/02/2015 at 13:49.
Pushed by rempt into branch 'master'.

M  +10   -3    krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
M  +3    -1    krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h
M  +5    -0    krita/ui/KisDocumentSectionView.cpp
M  +1    -0    krita/ui/KisDocumentSectionView.h

http://commits.kde.org/calligra/75e35fbcd90b33a2df5d2c9276dd20db798f94db