Bug 452267 - Arrow keys of Transform Tool behave strangely when the Pivot Point is moved
Summary: Arrow keys of Transform Tool behave strangely when the Pivot Point is moved
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Lynx3d
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-04 17:16 UTC by Tyson Tan
Modified: 2022-04-13 09:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Arrow Key press order was UP-DOWN-LEFT-RIGHT in the video (967.63 KB, video/mp4)
2022-04-04 17:16 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2022-04-04 17:16:39 UTC
Created attachment 147959 [details]
Arrow Key press order was UP-DOWN-LEFT-RIGHT in the video

SUMMARY
When using Transform Tool, if I moved the Pivot Point of the object, the Arrow Keys move object towards unpredictable direction.


STEPS TO REPRODUCE
1. Create a new document
2. Draw something on a new layer
3. Transform Tool
4. Move the Pivot Point
5. Press the Arrow keys with the order: UP-DOWN-LEFT-RIGHT

OBSERVED RESULT
The object moves randomly.

EXPECTED RESULT
The object moves to the direction of an arrow key.

The bug was initially reported from the community, they used Windows version 5.0.2. I reproduced the bug with krita-5.1.0-prealpha-bcff23b8f0-x86_64.appimage
Comment 1 David REVOY 2022-04-04 17:29:24 UTC
Oh yes, this feel random. I can reproduce easily in 5.0.2appimage on Kubuntu 20.04 as well. 

I tested also older appimage: I can reproduce in 4.4.8, 4.4.2  down to 4.4.1. But not in 4.2.8 or 3.1 because arrows does nothing by default on these older version. So, it sounds like this bug is here since the keyboard arrow keys can move the transform widget and not a regression.
Comment 2 Lynx3d 2022-04-13 08:45:59 UTC
Git commit afb39218a2194fac8b8c99e2e3fc5b8e0027c23a by Mathias Wein.
Committed on 13/04/2022 at 07:36.
Pushed by mwein into branch 'master'.

Fix transform tool move keys with non-default pivot

Transform center and transform pivot can be different, so every move
was off by the difference.
The absolute position shown in the UI is a derived (and rounded) value
that is not directly accessible, so move the transform center directly.

M  +14   -2    plugins/tools/tool_transform2/kis_tool_transform.cc

https://invent.kde.org/graphics/krita/commit/afb39218a2194fac8b8c99e2e3fc5b8e0027c23a
Comment 3 Tyson Tan 2022-04-13 09:06:12 UTC
Thank you, Lynx! :)