Bug 424027

Summary: Hide painting assistant guidelines for tools that do not use them
Product: [Applications] krita Reporter: Frans Slothouber <rfsber>
Component: CPU CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard, halla
Priority: NOR    
Version: 4.3.0-beta2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Artifacts (red) while drawing in blue with calligraphy tool

Description Frans Slothouber 2020-07-09 14:25:25 UTC
SUMMARY

The guide lines for the painting assistants also show when tools
other then the free hand tool is selected.  

For some of these tools they also leave behind artifact when the tool
is used.

Feature request:  hide the guidelines for tools other than the free hand tool.

STEPS TO REPRODUCE
1. Create an assistant
2. Select a 'ink pen too'
3. draw

OBSERVED RESULT

Artifacts are show and guide lines are shown

EXPECTED RESULT

No Artifacts are show and no guide lines are shown

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

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2020-07-14 20:27:16 UTC
Are you sure you mean the 4.3.0-beta2 version?

When you say 'guidelines', do you mean the Assistant Previews?

I've tried this with the latest 5.0.0 prealpha appimage and I don't see artifacts when using the Line, Polygon and Polyline tool with assistant previews turned on.

Also, I find the assistant previews to be useful, especially when using the line tool.
In Steps To Reproduce, Step 3, which tool do you mean to draw with?

Can you provide a screenshot showing the artifacts?
Comment 2 Frans Slothouber 2020-07-14 21:22:43 UTC
Created attachment 130129 [details]
Artifacts (red) while drawing in blue with calligraphy tool
Comment 3 Frans Slothouber 2020-07-14 21:29:54 UTC
For the screenshit I added four parallel painting assistants. 
Chose a red color from them. Then selected a blue color and
drew with the calligraphy tool (so that is  the tool for step 3)

While drawing little red lines appear.
When releasing the left mouse button longer red lines appear.
They disapear when another tool is selected.

Might be a minor problem as it only only occurs when in the Display Settings the Canvas Acceleration is turned off.
(Had turned it off by accident while working on a unit test).
Comment 4 Bug Janitor Service 2020-07-15 04:33:10 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Ahab Greybeard 2020-07-15 08:16:24 UTC
I see this happen and it only happens with the calligraphy tool when graphics acceleration is turned off and with assistant previews turned on.

The long lived artifacts are in the shape and colour of the assistant preview lines.
The artifacts are also removed if you scroll-zoom on the screen.

[The calligraphy tool does seem to be different/special in various ways.]

There are other bugs associated with graphics acceleration being turned off, eg:
https://bugs.kde.org/show_bug.cgi?id=423840  and:
https://bugs.kde.org/show_bug.cgi?id=424037

These have fix commits being implemented so I suggest waiting until they're available as builds so this can be checked again.

Setting to Confirmed and waiting for more tests.
Comment 6 Dmitry Kazakov 2023-06-23 14:10:54 UTC
Git commit f7a502588a071da3fe2768c07fff117810d6cf95 by Dmitry Kazakov.
Committed on 23/06/2023 at 14:10.
Pushed by dkazakov into branch 'master'.

Hide assistant's decorations for the tools that don't support that

M  +6    -0    libs/ui/canvas/kis_tool_proxy.cpp
M  +2    -0    libs/ui/canvas/kis_tool_proxy.h
M  +12   -8    libs/ui/kis_painting_assistants_decoration.cpp
M  +5    -0    libs/ui/tool/kis_tool.cc
M  +1    -0    libs/ui/tool/kis_tool.h
M  +5    -0    libs/ui/tool/kis_tool_freehand.cc
M  +2    -0    libs/ui/tool/kis_tool_freehand.h
M  +5    -0    plugins/tools/basictools/kis_tool_line.cc
M  +2    -0    plugins/tools/basictools/kis_tool_line.h

https://invent.kde.org/graphics/krita/-/commit/f7a502588a071da3fe2768c07fff117810d6cf95