Bug 392622

Summary: "Reload Original Preset" while canvas is mirrored causes brush tip to also become mirrored.
Product: [Applications] krita Reporter: Luis Payano <metashinryu>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: emmetoneill.pdx, tamtamy.tymona
Priority: NOR Keywords: investigated, triaged
Version First Reported In: 4.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Luis Payano 2018-04-01 23:48:20 UTC
Using the reset preset button while in mirror mode leaves the brush tip flipped horizontally.

Video demonstration:

https://youtu.be/jM-xRThZSp0


Steps to reproduce:

1)Reset and use asymmetrical brush preset(looks as expected)
2)Mirror canvas horizontally and use the same asymmetrical brush preset(looks as expected)
3)Reset and use the same asymmetrical brush preset(looks flipped)
4)Mirror canvas horizontally
5)Use the same asymmetrical brush preset again(looks right again)

The brush will appear to be flipped horizontally until the mirror mode is switched again, and wont flip back unless the reset button is pressed while in mirror mode.

At first i thought it was a feature i used on accident, it would be cool to have an option to lock brush direction even after resetting the preset to keep  the texture/shape consistent in symmetric images, but then i noticed it doesnt carry the direction unless the reset button is used in the former fashion.

As a side note, i think there was a version of this bug in previous releases of krita 3, but the steps to reproduce it were slightly different, i didn't use symmetry much back then so i had a harder time noticing when or why it happened.
Comment 1 Emmet O'Neill 2018-09-15 21:36:24 UTC
Confirmed by bug squad on Linux with latest master (4.2.0-pre-alpha git 12b52e3).

As Luis demonstrated, mirroring the canvas normal does not affect the shape or orientation of the user's brush. However, clicking "Reload Original Preset" while your canvas is mirrored will also mirror the users brush. (Great bug report, by the way Luis!)

Whether or not mirroring the brush tip while the canvas is mirrored is desirable is probably up for debate, but right now it's inconsistent. I'd say this is a minor-normal level bug.
Comment 2 Tiar 2019-05-10 08:45:51 UTC
Things to note:
- For testing purposes, Rake_bristly_dry is good: shows the issue.
- If you mirror without moving your brush, the brush outline looks flipped, too.
- After you move the cursor, it jumps to the point on the other side of the canvas (if you were near the center, you may not notice that) and looks normal again.
- Workaround: after reseting the preset, use mirror view twice and it will fix itself.
Comment 3 Dmitry Kazakov 2019-05-16 21:54:09 UTC
Git commit 756991435ecdf2c1af8aabb137beec4cd39ba277 by Dmitry Kazakov.
Committed on 16/05/2019 at 21:53.
Pushed by dkazakov into branch 'master'.

Add a workaround for reinitializing rotation/mirroring options after reloading the preset

Ideally, we should not store this data in the preset itself. Then we
would not need these hacks. But we store it...

M  +15   -0    libs/ui/kis_paintop_box.cc

https://invent.kde.org/kde/krita/commit/756991435ecdf2c1af8aabb137beec4cd39ba277
Comment 4 Halla Rempt 2019-05-17 08:13:01 UTC
Git commit 067968580147a65719e78bf779f70f40c3ee3207 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 17/05/2019 at 08:12.
Pushed by rempt into branch 'krita/4.2'.

Add a workaround for reinitializing rotation/mirroring options after reloading the preset

Ideally, we should not store this data in the preset itself. Then we
would not need these hacks. But we store it...

M  +15   -0    libs/ui/kis_paintop_box.cc

https://invent.kde.org/kde/krita/commit/067968580147a65719e78bf779f70f40c3ee3207
Comment 5 Dmitry Kazakov 2021-01-28 06:44:23 UTC
Git commit a8c563a69a77790df8da8801b588325e21cb89a9 by Dmitry Kazakov.
Committed on 26/01/2021 at 14:54.
Pushed by dkazakov into branch 'master'.

Remove hackish updates when reloading the preset

These updates were needed when we stored canvas rotation/mirroring
information in the preset itself. We don't store it there since
long ago, this information is stored in KisPaintInformation object
instead.

I have tested the mentioned bug and it didn't happen (obviously).

M  +0    -11   libs/ui/kis_paintop_box.cc

https://invent.kde.org/graphics/krita/commit/a8c563a69a77790df8da8801b588325e21cb89a9