Bug 421911 - Undo doesn't do the job with contiguous selection tool
Summary: Undo doesn't do the job with contiguous selection tool
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.9
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-22 12:48 UTC by acc4commissions
Modified: 2020-06-02 12:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description acc4commissions 2020-05-22 12:48:09 UTC
SUMMARY
It happens with the 4.3.0 beta too.

STEPS TO REPRODUCE
1 Load any image
2 Select an area with contiguous selection tool > erase
3 Repeat step 2 multiple times, and try to get back where you started using undo function

The result : Some areas is gonna remain empty and not get restored, as if that part of the data is permanently gone.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 David REVOY 2020-05-22 13:25:20 UTC
I confirm, I can reproduce in Git~c16cf7c (4.3'nightly'appimage) on Kubuntu Linux 19.10.
I had to do 5x [contiguous selections + erase with delete], the two first couldn't be undone and colors selected are erased for good.
Comment 2 acc4commissions 2020-05-22 15:39:44 UTC
I'm not sure it's a tool-specific issue, but I haven't been able to find other tools or functions have this issue with undo.
Comment 3 Dmitry Kazakov 2020-05-29 19:52:31 UTC
Hi, acc4commissions and David!

Could you please check if this package fixes the problem for you?
https://yadi.sk/d/PkqBBYdP8urX4g
Comment 4 acc4commissions 2020-05-30 06:11:27 UTC
(In reply to Dmitry Kazakov from comment #3)
> Hi, acc4commissions and David!
> 
> Could you please check if this package fixes the problem for you?
> https://yadi.sk/d/PkqBBYdP8urX4g

I want to test but my OS is Windows, not Linux.
Comment 5 David REVOY 2020-05-30 21:04:11 UTC
I can still reproduce @dmitryk with the build (thanks for the appimage). 

I took the contiguous selection tool on a flat artwork, and selected areas of colors then deleted them with delete key immediately (repeated it for 5 or 6 area), then I tried to undo them one by one and redo. I has a lot of glitch, missing redo, missing undos.
Comment 6 David REVOY 2020-05-30 21:10:08 UTC
Video (1minute, webm, 9MB) of the bug:
https://www.peppercarrot.com/extras/temp/2020-05-30_undo-contiguous-bug.webm
Comment 7 Dmitry Kazakov 2020-06-02 09:48:51 UTC
Okay, the bug seem to be reproducible in 4.3 branch, but is not reproducible in master. My vector selections undo patchset does **not** fix the issue (https://invent.kde.org/graphics/krita/-/merge_requests/351). Probably, it was fixed in master by some other "dangerous" patchset that was not backported.
Comment 8 Dmitry Kazakov 2020-06-02 12:01:28 UTC
The bug was fixed in the commit listed below. I have cherry-picked that to 4.3.1 branch.


commit 10cad8b7a4721b33c98923beb354e5457b5cc48d (HEAD)
Author: Dmitry Kazakov <dimula73@gmail.com>
Date:   Fri May 1 17:24:54 2020 +0300

[NOT FOR 4.3.0] Remove start position from KisRandomAccessor2

Start posiiton in ctor is not used anywhere, it only causes bugs
like 395861, because some code passes default value (0,0) to it,
which extends extent of the paint device, to the area, which is
not actually modified.

It might also fix some troubles with Transform Tool (not tested).

CCBUG:395861