Bug 435970

Summary: Snapping to guides while transforming doesn't work when holding shift
Product: [Applications] krita Reporter: Manga Tengu <mangatengu>
Component: Tools/TransformAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard, dimula73
Priority: NOR    
Version First Reported In: 4.4.3   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Manga Tengu 2021-04-20 18:34:55 UTC
Transform an object and try to scale it down or up to meet a guide. If you have activated guides snapping it will snap. But if you try the same thing while holding shift to have a uniform scaling, snapping doesn't work anymore.


STEPS TO REPRODUCE
1. activate guide snapping
2. transform an object to meet a guide and notice it snaps
3. try the same thing while holding shift to make a uniform scaling 

OBSERVED RESULT
Snapping doesn't work when shift is pressed

EXPECTED RESULT
Snapping should work when scaling uniformly or based on the center of an object
Comment 1 Halla Rempt 2021-04-20 18:35:37 UTC
*** Bug 435969 has been marked as a duplicate of this bug. ***
Comment 2 Ahab Greybeard 2021-04-22 14:53:54 UTC
I can confirm this for the 4.4.3 and Apr 21 5.0.0-prealpda (git 3eda0b9) appimages.

It happens for snapping to guides, grid, centre and image bounds.
Comment 3 Dmitry Kazakov 2021-07-19 15:02:38 UTC
Git commit c81ba5b30c33b14594c3a8900f29d40d2691d34a by Dmitry Kazakov.
Committed on 19/07/2021 at 15:02.
Pushed by dkazakov into branch 'master'.

Fix handle snapping in the transform tool

The patch fixes two issues:

1) Shift modifier does not disable snapping for the strategies that
   use Shift as well. That is needed to resolve the conflict of
   modifiers between the transform tool and the snapping system.

2) Enables snapping for cage, warp and mesh transform mode.

M  +2    -1    plugins/tools/tool_transform2/kis_cage_transform_strategy.cpp
M  +1    -1    plugins/tools/tool_transform2/kis_cage_transform_strategy.h
M  +5    -0    plugins/tools/tool_transform2/kis_free_transform_strategy.cpp
M  +2    -0    plugins/tools/tool_transform2/kis_free_transform_strategy.h
M  +23   -1    plugins/tools/tool_transform2/kis_mesh_transform_strategy.cpp
M  +4    -1    plugins/tools/tool_transform2/kis_mesh_transform_strategy.h
M  +32   -13   plugins/tools/tool_transform2/kis_simplified_action_policy_strategy.cpp
M  +4    -0    plugins/tools/tool_transform2/kis_simplified_action_policy_strategy.h
M  +3    -0    plugins/tools/tool_transform2/kis_tool_transform.cc
M  +2    -1    plugins/tools/tool_transform2/kis_warp_transform_strategy.cpp
M  +1    -0    plugins/tools/tool_transform2/kis_warp_transform_strategy.h

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