Bug 412808 - Undoing selecting new area makes the previous selection invisible in global selection mask
Summary: Undoing selecting new area makes the previous selection invisible in global s...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-10 11:13 UTC by acc4commissions
Modified: 2020-01-09 13:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
recording (875.03 KB, video/mp4)
2019-10-10 11:14 UTC, acc4commissions
Details
recording2 (1.04 MB, video/mp4)
2019-10-17 15:16 UTC, acc4commissions
Details

Note You need to log in before you can comment on or make changes to this bug.
Description acc4commissions 2019-10-10 11:13:11 UTC
SUMMARY
git 56ee905

Check the video attatched.

Also, once you undo the selecting new area,
1 'Deselect' shortcut doesn't work. It returns back to normal after any selection-related action is done to the canvas.
2 Can't paint anything with brush tool.
3 If you select the transform tool, it works, but the area is different than the current marching ants are placed.

I feel currently there's a lot of bugginess in selecting tool and transform tool, but I can't catch exact moments of them...

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

ADDITIONAL INFORMATION
Comment 1 acc4commissions 2019-10-10 11:14:15 UTC
Created attachment 123121 [details]
recording
Comment 2 Ahab Greybeard 2019-10-10 13:42:34 UTC
This happens with the latest 4.3.0-prealpha (git 0cc05e0) appimage but only with the vector selection mode.
The maching ants outline is 'false' and does not represent an active selction, but it should do.

Setting to Confirmed
Comment 3 acc4commissions 2019-10-17 15:16:02 UTC
Created attachment 123279 [details]
recording2

Found 2 new thigs.

1 If you select a new area that include the previous area before undoing it, the later operations is applied to the intersecting area. 

2 It doesn't happen with contiguous selection tool.
Comment 4 acc4commissions 2019-10-18 00:43:53 UTC
(In reply to acc4commissions from comment #3)
> 1 If you select a new area that include the previous area before undoing it,
> the later operations is applied to the intersecting area. 

If you use outline selection tool to do this, the 'intersecting area' appears to be square-shaped, even though the original shape was different.
Comment 5 acc4commissions 2019-10-18 00:50:32 UTC
(In reply to acc4commissions from comment #4)
> If you use outline selection tool

I was wrong. Appareantly it happens with all selection tools...
Comment 6 Dmitry Kazakov 2019-11-19 11:54:21 UTC
Git commit 7a709c5480aa24bb693a937feb8465f5e0547c4e by Dmitry Kazakov.
Committed on 19/11/2019 at 11:54.
Pushed by dkazakov into branch 'master'.

Fix undo of replacing vector selection

When redoing KisTakeAllShapesCommand, we should keep the
selection projection, but when undoing it, we should start a
full-featured update to get a correct canvas state. It is needed
because pixel selection is used as a projection in shape-mode, so
undo/redo for it is not valid.

M  +5    -0    libs/image/kis_selection.cc
M  +2    -0    libs/image/kis_selection.h
M  +1    -1    libs/ui/flake/kis_shape_selection.cpp
M  +4    -0    libs/ui/flake/kis_shape_selection_model.cpp
M  +5    -4    libs/ui/flake/kis_take_all_shapes_command.cpp
M  +4    -1    libs/ui/flake/kis_take_all_shapes_command.h
M  +107  -0    libs/ui/tests/kis_shape_selection_test.cpp
M  +2    -0    libs/ui/tests/kis_shape_selection_test.h

https://invent.kde.org/kde/krita/commit/7a709c5480aa24bb693a937feb8465f5e0547c4e
Comment 7 Tiar 2020-01-09 13:54:14 UTC
Git commit f2394e71d5a126e9a8cf32323a4251a178302e34 by Agata Cacko, on behalf of Dmitry Kazakov.
Committed on 09/01/2020 at 13:54.
Pushed by tymond into branch 'krita/4.2'.

Fix undo of replacing vector selection

When redoing KisTakeAllShapesCommand, we should keep the
selection projection, but when undoing it, we should start a
full-featured update to get a correct canvas state. It is needed
because pixel selection is used as a projection in shape-mode, so
undo/redo for it is not valid.


(cherry picked from commit 7a709c5480aa24bb693a937feb8465f5e0547c4e)

M  +5    -0    libs/image/kis_selection.cc
M  +2    -0    libs/image/kis_selection.h
M  +1    -1    libs/ui/flake/kis_shape_selection.cpp
M  +4    -0    libs/ui/flake/kis_shape_selection_model.cpp
M  +5    -4    libs/ui/flake/kis_take_all_shapes_command.cpp
M  +4    -1    libs/ui/flake/kis_take_all_shapes_command.h
M  +107  -0    libs/ui/tests/kis_shape_selection_test.cpp
M  +2    -0    libs/ui/tests/kis_shape_selection_test.h

https://invent.kde.org/kde/krita/commit/f2394e71d5a126e9a8cf32323a4251a178302e34