Bug 426523 - Bug with the outline selection tool for advanced selection technique
Summary: Bug with the outline selection tool for advanced selection technique
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 13:50 UTC by stephen
Modified: 2022-02-23 14:57 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stephen 2020-09-14 13:50:53 UTC
SUMMARY
1) This bug is about the outline selection tool.
But first, I want to recall that using the polyline tool, it's still not possible to switch to the outline selection using modifier keys while drawing the perimeter of the selection area. And changing the parameters of this selection tool isn't possible in the settings menu.

Alright. So the bug manifests as follows : with a first selection area active, it's impossible to add a new one should you switch to the polyline tool as you draw the new perimeter of the additional selection area.
Because doing so results in an unexpected behavior which either cancels all the selection areas, or cancels the new perimeter you draw. 
The only way so far to add multiple selection areas is to avoid the use of the CTRL modifier key, meaning that you can't switch to the polyline tool after your first selection area is done

STEPS TO REPRODUCE
1. Create a selection area with the outline selection tool
2. Try to build a new selection area to add, but make sure you hold CTRL key to try switching to the polyline tool as you draw it.

OBSERVED RESULT
The new area refuses to be added/subtracted or all your selections areas are dismissed. So CTRL modifier key = cancellation for add/subtract use cases.
Not good.

EXPECTED RESULT
The new area should be added/subtracted depending on the modifier key you held before releasing your pen/mouse, or before committing your selection area. 

SOFTWARE/OS VERSION
Windows 10 1909
Comment 1 Ahab Greybeard 2020-09-15 11:05:38 UTC
Testing with the Sept16 4.4.0 alpha (git ec84ff1) appimage

Given that the Ctrl key can be used as a post-modifier to convert the outline selection tool to a polygonal selection tool, is it required that the polygonal selecton tool can be similarly converted to an outline selection tool (apart from the niceness of symmetry)?

The Ctrl key, used as a pre-modifier, will and is supposed to set the subsequent selection to Replace.
This behaviour seems to be 'leaking' into the use of the outline -> polygonal conversion when a Crtl post-modifier is used and polygonal selection segments are created.

Setting to CONFIRMED because of this.

However, The use of the Ctrl key post-modifier in this situation involves releasing and then re-pressing the LMB so that the Ctrl key effectively becomes a pre-modifier for parts of the selection.

Similar behaviour is seen when the Ctrl or Shift keys are used as post-modifiers for the rectangular or elliptical selection tools if you release and re-press the LMB (even though this in't normally done).
The Ctrl or Shift Keys then produce forced Replace or Add mode.
Comment 2 Deif Lou 2022-02-23 14:57:36 UTC
Git commit 9fbd23bdd29d0463b650c67b3b79f41ec45bf87c by Deif Lou.
Committed on 23/02/2022 at 14:56.
Pushed by deiflou into branch 'master'.

Improve selection tools' use of modifiers
Related: bug 420737, bug 420298, bug 435848

M  +5    -0    libs/basicflakes/tools/KoCreatePathTool.cpp
M  +7    -0    libs/basicflakes/tools/KoCreatePathTool.h
M  +2    -0    libs/ui/tool/KisToolOutlineBase.cpp
M  +5    -16   libs/ui/tool/kis_tool_polyline_base.cpp
M  +0    -5    libs/ui/tool/kis_tool_polyline_base.h
M  +35   -10   libs/ui/tool/kis_tool_rectangle_base.cpp
M  +3    -3    libs/ui/tool/kis_tool_rectangle_base.h
M  +161  -68   libs/ui/tool/kis_tool_select_base.h
M  +7    -0    libs/ui/tool/kis_tool_shape.h
M  +34   -15   plugins/tools/selectiontools/KisToolSelectMagnetic.cc
M  +15   -3    plugins/tools/selectiontools/kis_tool_select_contiguous.cc
M  +1    -0    plugins/tools/selectiontools/kis_tool_select_contiguous.h
M  +11   -7    plugins/tools/selectiontools/kis_tool_select_elliptical.cc
M  +5    -17   plugins/tools/selectiontools/kis_tool_select_elliptical.h
M  +20   -8    plugins/tools/selectiontools/kis_tool_select_outline.cc
M  +5    -8    plugins/tools/selectiontools/kis_tool_select_outline.h
M  +13   -10   plugins/tools/selectiontools/kis_tool_select_path.cc
M  +3    -2    plugins/tools/selectiontools/kis_tool_select_path.h
M  +12   -3    plugins/tools/selectiontools/kis_tool_select_polygonal.cc
M  +4    -7    plugins/tools/selectiontools/kis_tool_select_polygonal.h
M  +13   -8    plugins/tools/selectiontools/kis_tool_select_rectangular.cc
M  +4    -11   plugins/tools/selectiontools/kis_tool_select_rectangular.h
M  +17   -4    plugins/tools/selectiontools/kis_tool_select_similar.cc
M  +1    -0    plugins/tools/selectiontools/kis_tool_select_similar.h

https://invent.kde.org/graphics/krita/commit/9fbd23bdd29d0463b650c67b3b79f41ec45bf87c