Bug 439549 - Request : prevent snap toggle to cancel/commit transform mode
Summary: Request : prevent snap toggle to cancel/commit transform mode
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (other bugs)
Version First Reported In: 4.4.5
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 09:51 UTC by stephen
Modified: 2021-07-17 07:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stephen 2021-07-06 09:51:00 UTC
SUMMARY
The snap toggle feature cancels/commits an
active transform mode. This is not a bug but a situation
which is in my opinion, counter productive. 
I hope you can do something about it.

STEPS TO REPRODUCE
1. Have some pixels painted on a layer.
2. Go in transform mode, I press "CTRL + T" on my side for that.
3. While in transform mode, toggle any snapping on or off

OBSERVED RESULT
Toggling the snapping commits the active transform mode, and you exit it
without wanting that.
Like if it's necessary to exit transform mode for the snapping to be enabled/disabled.

EXPECTED RESULT
The transform mode is supposed to stay active, whether the snap is toggled on or off. Snap_toggle() != commit_transform().

SOFTWARE/OS VERSIONS
Windows 10 1909 

But it's probably applicable to all other OSs as well.
Comment 1 Dmitry Kazakov 2021-07-13 08:39:43 UTC
Git commit c61e01de8cfe3964884c290b79c399e2b4b4eb04 by Dmitry Kazakov.
Committed on 13/07/2021 at 08:39.
Pushed by dkazakov into branch 'master'.

Do not resync decorations wrapper layer when snap-to-guide/grid changes

Resyncing starts a stroke that interrupts the currently running
user action (e.g. Transform Tool), which is not what the user expects.

M  +16   -2    libs/ui/KisDocument.cpp
M  +8    -0    libs/ui/canvas/kis_grid_config.cpp
M  +2    -0    libs/ui/canvas/kis_grid_config.h
M  +8    -0    libs/ui/canvas/kis_guides_config.cpp
M  +2    -0    libs/ui/canvas/kis_guides_config.h

https://invent.kde.org/graphics/krita/commit/c61e01de8cfe3964884c290b79c399e2b4b4eb04
Comment 2 Dmitry Kazakov 2021-07-17 07:44:06 UTC
Git commit 8b99868c5b43c3f9b6943feff89e0165fbdbf050 by Dmitry Kazakov.
Committed on 17/07/2021 at 07:23.
Pushed by dkazakov into branch 'master'.

Revert "Do not resync decorations wrapper layer when snap-to-guide/grid changes"

This reverts commit c61e01de8cfe3964884c290b79c399e2b4b4eb04.

M  +2    -16   libs/ui/KisDocument.cpp
M  +0    -8    libs/ui/canvas/kis_grid_config.cpp
M  +0    -2    libs/ui/canvas/kis_grid_config.h
M  +0    -8    libs/ui/canvas/kis_guides_config.cpp
M  +0    -2    libs/ui/canvas/kis_guides_config.h

https://invent.kde.org/graphics/krita/commit/8b99868c5b43c3f9b6943feff89e0165fbdbf050
Comment 3 Dmitry Kazakov 2021-07-17 07:44:14 UTC
Git commit c3c97d104a6c423520dc5719594a5744d92cfc0c by Dmitry Kazakov.
Committed on 17/07/2021 at 07:25.
Pushed by dkazakov into branch 'master'.

Properly fix cancellation of the transform tool when changing guides config

We can easily postpone the synchronization of the decorations layer. The
layer itself doesn't store any decorations data. Instead, it just links
to the document itself. So we can update this link whatever time we like
later.
Related: bug 439848

M  +1    -0    libs/ui/KisDocument.cpp

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