Bug 361012 - Guides: Undo only actions, not user settings?
Summary: Guides: Undo only actions, not user settings?
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 3.0 Alpha
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 361011 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-26 13:49 UTC by mvowada
Modified: 2019-06-10 08:04 UTC (History)
4 users (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 mvowada 2016-03-26 13:49:14 UTC
Personal view, however I think it'd be better if undo/redo commands couldn't affect user settings, only operations. (Ubuntu 14.04 Unity - Krita 3.0 Pre-alpha 3 AppImage)

Reproducible: Always

Steps to Reproduce:
1. Lock/Unlock guide
2. Undo

Actual Results:  
undo "Lock/Unlock guide"

Expected Results:  
nothing (or undo the last operation)
Comment 1 Halla Rempt 2016-03-30 23:56:00 UTC
I agree.
Comment 2 Halla Rempt 2016-03-31 09:22:01 UTC
*** Bug 361011 has been marked as a duplicate of this bug. ***
Comment 3 Sven Langkamp 2016-03-31 17:03:44 UTC
I don't agree. There is no application that does it. At least it shouldn't be in the general undo stack.

We did do the opposite in the past when we e.g. made switching the visibility of a layer not undoable.
Comment 4 Halla Rempt 2016-03-31 17:17:12 UTC
Er... You _do_ agree: all of us are saying that things like setting "lock/unlock" guide shouldn't be end up in the undo stack; right now, they do.
Comment 5 Dmitry Kazakov 2016-04-19 17:10:24 UTC
Do I understand it right that the guides settings should work in the following way:

1) Grids --- changing any settings in the docker should not be undoable
2) Guides:
2.1) Creation, Removal, Moving guides should be undoable
2.2) Any other options of the guides should not be undoable

Right?
Comment 6 Halla Rempt 2016-04-20 06:23:01 UTC
Yes, that's it.
Comment 7 mvowada 2016-04-20 08:28:29 UTC
(In reply to Dmitry Kazakov from comment #5)

Thanks, I'm 100% in agreement with Dmitry and Boudewijn, with a note:

> 2.1) Creation, Removal, Moving guides should be undoable

That's right, only if it's possible, I'd prefer one step at a time, e.g.:

1. add multiple guides consecutively;
2. hit CTRL + Z ("Undo").

Expected Results: "Undo" should affect only the last guide added. Currently it seems it reverts all the added guides.
Comment 8 tusooa 2019-06-01 10:55:36 UTC
Git commit 2a3fccde53e1017bd22deeaedd2f29fabb4e494a by Tusooa Zhu.
Committed on 01/06/2019 at 09:56.
Pushed by tusooaw into branch 'master'.

Control the merging and creation of KisChangeGuidesCommand

Only adding/removing/moving a guide will trigger the creation
of KisChangeGuidesCommand. Only consecutive movements, or creation
then movement, or movement then deletion of the same guide
will trigger the merging of the commands.

M  +60   -2    libs/ui/canvas/kis_change_guides_command.cpp
M  +6    -0    libs/ui/canvas/kis_guides_config.cpp
M  +1    -0    libs/ui/canvas/kis_guides_config.h
M  +16   -2    libs/ui/canvas/kis_guides_manager.cpp

https://invent.kde.org/kde/krita/commit/2a3fccde53e1017bd22deeaedd2f29fabb4e494a
Comment 9 Halla Rempt 2019-06-04 15:21:33 UTC
Git commit 83d20e1377155aeba579ae22bda77be4b5d4ad8b by Boudewijn Rempt, on behalf of Tusooa Zhu.
Committed on 04/06/2019 at 15:18.
Pushed by rempt into branch 'krita/4.2'.

Control the merging and creation of KisChangeGuidesCommand

Only adding/removing/moving a guide will trigger the creation
of KisChangeGuidesCommand. Only consecutive movements, or creation
then movement, or movement then deletion of the same guide
will trigger the merging of the commands.

M  +60   -2    libs/ui/canvas/kis_change_guides_command.cpp
M  +6    -0    libs/ui/canvas/kis_guides_config.cpp
M  +1    -0    libs/ui/canvas/kis_guides_config.h
M  +16   -2    libs/ui/canvas/kis_guides_manager.cpp

https://invent.kde.org/kde/krita/commit/83d20e1377155aeba579ae22bda77be4b5d4ad8b
Comment 10 tusooa 2019-06-09 08:48:23 UTC
Fixed by the commits above.
Comment 11 mvowada 2019-06-10 08:04:03 UTC
Thanks!