Bug 437048

Summary: Zoom and Shift affect Freehand Selection Quality
Product: [Applications] krita Reporter: fivetailsfox
Component: Tools/SelectionAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard, halla, lynx.mw+kde, TheGreatSaibaman
Priority: NOR    
Version: 4.4.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: example of edge quality using freehand select under different conditions

Description fivetailsfox 2021-05-13 13:16:45 UTC
Created attachment 138388 [details]
example of edge quality using freehand select under different conditions

When zoomed out, making a selection of multiple areas with the freehand selection tool using SHIFT instead of manually setting the ADD mode causes significantly degraded edge quality.


STEPS TO REPRODUCE
1. Create a document and zoom out below 100%
2. Choose the freehand select tool and shift-select some shapes.
3. Fill them, then zoom in and look at the edges.
3a. Perhaps noteworthy is that the first shape is unaffected.

OBSERVED RESULT: Edge quality is very choppy. It doesn't matter if the select tool is set to vector, or pixel, or whether antialiased.


EXPECTED RESULT: smooth edges that match the way the tool works at 100% zoom or in ADD mode.


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

ADDITIONAL INFORMATION

See Attachment.
Comment 1 Ahab Greybeard 2021-05-13 14:37:45 UTC
I can confirm this for the May 13 5.0.0-prealpha appimage on Debian 10.

However, I don't agree with 3a. If I do all selections with the Shift key pressed (while in Replace mode), they all have rough outlines.
The first shape is smooth if it's done in Replace mode (Shift not pressed).

Using the Ctrl modifier to force an Add mode setting to do a Replace selection does not give a rough outlined selection.
Comment 2 Halla Rempt 2021-05-14 09:31:17 UTC
I've put this issue on the agenda for the Monday meeting.
Comment 3 Halla Rempt 2021-05-17 15:08:27 UTC
Okay, we first need to check with older builds (https://download.kde.org/Attic/krita/) whether this is a regression from some time ago. In any case, I'll ask Dmitry to look into it.
Comment 4 Ahab Greybeard 2021-05-18 07:35:19 UTC
It happens with the 3.0.0, 3.2.0, 3.3.3 and 4.4.0 appimages.
Comment 5 Halla Rempt 2021-05-18 07:46:54 UTC
Okay, so it's always been like this. Still, this needs fixing.
Comment 6 Dmitry Kazakov 2021-05-18 11:42:04 UTC
Git commit 296d226e0bf154214a6ef1f274a48dfc84ba6a07 by Dmitry Kazakov.
Committed on 18/05/2021 at 11:41.
Pushed by dkazakov into branch 'master'.

Fix outline-selection precision when shift-modifier is pressed

In KisToolOutline we should use best precision possible because
it affects line quality (obviously).

M  +6    -0    libs/ui/canvas/kis_tool_proxy.cpp
M  +1    -0    libs/ui/canvas/kis_tool_proxy.h
M  +2    -1    libs/ui/input/kis_abstract_input_action.cpp
M  +1    -1    libs/ui/input/kis_abstract_input_action.h
M  +7    -1    libs/ui/input/kis_alternate_invocation_action.cpp
M  +4    -1    libs/ui/input/kis_alternate_invocation_action.h
M  +2    -1    libs/ui/input/kis_pan_action.cpp
M  +1    -1    libs/ui/input/kis_pan_action.h
M  +2    -1    libs/ui/input/kis_rotate_canvas_action.cpp
M  +1    -1    libs/ui/input/kis_rotate_canvas_action.h
M  +1    -1    libs/ui/input/kis_shortcut_matcher.cpp
M  +2    -1    libs/ui/input/kis_tool_invocation_action.cpp
M  +1    -1    libs/ui/input/kis_tool_invocation_action.h
M  +2    -1    libs/ui/input/kis_zoom_action.cpp
M  +1    -1    libs/ui/input/kis_zoom_action.h
M  +6    -0    libs/ui/tool/kis_tool.cc
M  +1    -1    libs/ui/tool/kis_tool.h
M  +15   -0    plugins/tools/selectiontools/kis_tool_select_outline.cc
M  +3    -0    plugins/tools/selectiontools/kis_tool_select_outline.h

https://invent.kde.org/graphics/krita/commit/296d226e0bf154214a6ef1f274a48dfc84ba6a07
Comment 7 Dmitry Kazakov 2021-06-01 13:14:56 UTC
Git commit 905c2b16a98953f8777ee6f4d73c69297e600848 by Dmitry Kazakov.
Committed on 01/06/2021 at 12:02.
Pushed by dkazakov into branch 'krita/4.3'.

Fix outline-selection precision when shift-modifier is pressed

In KisToolOutline we should use best precision possible because
it affects line quality (obviously).

M  +6    -0    libs/ui/canvas/kis_tool_proxy.cpp
M  +1    -0    libs/ui/canvas/kis_tool_proxy.h
M  +2    -1    libs/ui/input/kis_abstract_input_action.cpp
M  +1    -1    libs/ui/input/kis_abstract_input_action.h
M  +7    -1    libs/ui/input/kis_alternate_invocation_action.cpp
M  +4    -1    libs/ui/input/kis_alternate_invocation_action.h
M  +2    -1    libs/ui/input/kis_pan_action.cpp
M  +1    -1    libs/ui/input/kis_pan_action.h
M  +2    -1    libs/ui/input/kis_rotate_canvas_action.cpp
M  +1    -1    libs/ui/input/kis_rotate_canvas_action.h
M  +1    -1    libs/ui/input/kis_shortcut_matcher.cpp
M  +2    -1    libs/ui/input/kis_tool_invocation_action.cpp
M  +1    -1    libs/ui/input/kis_tool_invocation_action.h
M  +2    -1    libs/ui/input/kis_zoom_action.cpp
M  +1    -1    libs/ui/input/kis_zoom_action.h
M  +6    -0    libs/ui/tool/kis_tool.cc
M  +1    -1    libs/ui/tool/kis_tool.h
M  +15   -0    plugins/tools/selectiontools/kis_tool_select_outline.cc
M  +3    -0    plugins/tools/selectiontools/kis_tool_select_outline.h

https://invent.kde.org/graphics/krita/commit/905c2b16a98953f8777ee6f4d73c69297e600848
Comment 8 fivetailsfox 2021-06-24 08:29:26 UTC
Not sure if I am meant to make a new report or not, but after updating to 4.4.5 I still have this problem, even though in the patch notes it said it was fixed.
Comment 9 Ahab Greybeard 2021-06-24 09:13:08 UTC
I can confirm that this still affects the 4.4.5 and Jun 22 5.0.0-prealpha appimages.
Comment 10 Dmitry Kazakov 2021-07-08 11:37:26 UTC
Git commit 094a9534d9c2c40ca5a1919817dacbcfbbe354fc by Dmitry Kazakov.
Committed on 08/07/2021 at 11:37.
Pushed by dkazakov into branch 'master'.

Make sure events of KisToolSelectOutline are not compressed when Shift is pressed

M  +8    -1    libs/ui/input/kis_change_primary_setting_action.cpp
M  +3    -1    libs/ui/input/kis_change_primary_setting_action.h

https://invent.kde.org/graphics/krita/commit/094a9534d9c2c40ca5a1919817dacbcfbbe354fc
Comment 11 Dmitry Kazakov 2021-07-08 13:26:56 UTC
Git commit ebe593319e01d85727e27e508d8dbf4a9867ae5d by Dmitry Kazakov.
Committed on 08/07/2021 at 13:26.
Pushed by dkazakov into branch 'master'.

Fix rounding when creating outline selection with Shift modifier

That was a nasty misprint :)

M  +1    -1    libs/ui/input/kis_change_primary_setting_action.cpp

https://invent.kde.org/graphics/krita/commit/ebe593319e01d85727e27e508d8dbf4a9867ae5d
Comment 12 Ahab Greybeard 2021-07-10 09:21:08 UTC
*** Bug 435964 has been marked as a duplicate of this bug. ***