Bug 426865 - Displayed selection in paint layer is not updated after moving it in the local selection mask
Summary: Displayed selection in paint layer is not updated after moving it in the loca...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (show other bugs)
Version: 4.3.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-22 10:37 UTC by Nicolas Greliche
Modified: 2020-09-25 16:30 UTC (History)
1 user (show)

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


Attachments
Initial shifted outline (60.59 KB, image/png)
2020-09-22 14:20 UTC, Ahab Greybeard
Details
Further shifted outline (41.08 KB, image/png)
2020-09-22 14:21 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Greliche 2020-09-22 10:37:07 UTC
SUMMARY

* issue: If I select an area in a paint layer and create a local selection, moving the selection from within the selection mask (moving the white part), does not update the displayed selection in the paint layer.

* action resolving the issue: if after moving the selection, I modify it by painting on the selection mask, the issue disappears: the paint layer selection updates as expected.

* action preventing the issue to appear: if I create a local selection mask without having selected an area in the paint layer first, the issue doesn't seem to arise.

* other issue arising from issue: If I create another local selection, based on a selection that has been moved in the selection mask, but not updated in the paint layer, then, the new selection mask seems to agree with the displayed selection in the paint layer, rather than the actual area selected

STEPS TO REPRODUCE
1. Select an area in a paint layer
2. Create a local selection
3. Move the selected area (white part) within the selection mask
4. Go back to the paint layer

OBSERVED RESULT

The displayed selected area has not moved. When I try to paint, the paint is limited to the moved selection, not the displayed one, leading to a weird experience while painting 

EXPECTED RESULT

The displayed selection in the paint layer should move when the selection area in the selection mask is moved 


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu, Krita 4.3.0 appimage
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

AhabGreybeard reproduced the issue, also with Krita 4.3.0 appimage.
He didn't have the issue with only one local selection mask, only with two ore more, but I suspect it was because he didn't have any area selected in the paint layer when he created the first selection mask, as I had not tried that before.
He also says that "This has not been fixed in the Sept 20th Stable/Plus version", so he suggested I report the bug here
Happy to send screenshots if needed
Comment 1 Ahab Greybeard 2020-09-22 14:20:30 UTC
Created attachment 131869 [details]
Initial shifted outline

This is a strange one. It happens on the 4.3.0 appimage and the Sep20 4.4.0 alpha (git 1ee63d5) appimages.
The end-result is that the dotted outline of the selection does not correspond to the LSM (Local Selection Mask) content.
Any painting on the paint layer shows that the LSM content determines the selection, not the dotted outline.

As stated by Nicolas, painting on the LSM causes the dotted outline to then correspond to the LSM content.

However, Using the methods and steps as noted in the Description above I cannot reproduce the problem.
I can induce the problem by using two LSMs and then doing a move on the paint layer when both LSMs are deactivated.
This only happens for Pixel selections, not Vector selections.

I'm still investigating this and I will Confirm when I have a coherent and quantifiable description.

In the meantime, I attach two screenshots that illustrate the problem.
The red circle was painted and corresponds to the LSM content but you can see that the dotted outline is in the wrong location. I was able to induce a second, more shifted, dotted outine in the wrong location.
Comment 2 Ahab Greybeard 2020-09-22 14:21:10 UTC
Created attachment 131870 [details]
Further shifted outline
Comment 3 Ahab Greybeard 2020-09-25 16:30:29 UTC
I got confused between Pixel selections and Vector selections.

This happens with Vector selections, not with Pixel selections.
I can repeatably reproduce this with the steps as described in the original description.

It happens with versions 4.2.9 and 4.3.0 but not with the 4.4.0-beta1 or the latest Stable/Plus version.
I tested with appimages and also with portable .zip packages on Windows 10.

I'm convinced that I can induce it in other ways with recent builds but the process is complicated and doesn't always work.

Setting to Resolved Fixed (by unknown means).