Bug 391086 - Undo selection not working when displaying the selection in Mask mode
Summary: Undo selection not working when displaying the selection in Mask mode
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (other bugs)
Version First Reported In: 4.0.0-beta.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2018-02-26 06:53 UTC by tusooa
Modified: 2018-02-26 17:30 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2018-02-26 06:53:18 UTC
Version: krita-nightly-x64-v4.0.0.51-460-ge72f2bdea2

I am not able to undo a selection when displaying in Mask mode.

The following steps trigger this bug:
1. Open a document in Krita
2. Select something (under Mask mode)
3. Add something to the selection
4. Undo

Now the added area still appears as selected. If I change back to Ants mode, the selection area seems good (only first selection is shown), but I can still draw on the area that is selected in Step 3 (which appears NOT selected in Ants mode).

When adding to selection in Mask mode, and switching to Ants mode, and then undoing, the selection is "displayed" correctly but I still can draw to that deselected area.
Comment 1 mvowada 2018-02-26 14:23:16 UTC
I can confirm on Ubuntu 14.04 as well, using Krita 4 beta appimage.
(Display Mode: toggle icon in the bottom left hand corner of the status bar)
Comment 2 Halla Rempt 2018-02-26 14:25:01 UTC
Can you also check whether this is a regression, e.g. whether it also happens in the 3.3.3 appimage?
Comment 3 mvowada 2018-02-26 14:28:13 UTC
(In reply to Boudewijn Rempt from comment #2)
> Can you also check whether this is a regression, e.g. whether it also
> happens in the 3.3.3 appimage?

Yes it is a regression. 
It doesn't happen in the 3.3.3 appimage.
Comment 4 Dmitry Kazakov 2018-02-26 16:54:27 UTC
The problem is even a bit more severe: the selection's undo just doesn't work. Only outline changes, but real pixel data of the selection not.
Comment 5 Dmitry Kazakov 2018-02-26 17:30:21 UTC
Git commit 1d633079b43c6e5a68b47d14a3cca061c389805b by Dmitry Kazakov.
Committed on 26/02/2018 at 17:29.
Pushed by dkazakov into branch 'master'.

Fix undoing selection modifications when Mask Mode is active

We should not create a non-const iterator over a device when doing
a read-only operation not-in-a-stroke-context thread

M  +2    -2    libs/image/kis_pixel_selection.cpp

https://commits.kde.org/krita/1d633079b43c6e5a68b47d14a3cca061c389805b