-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for stopping the Undo History being desynchronized from actual Undo queue #84557
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TheSofox
force-pushed
the
undo-history-sync-fix
branch
2 times, most recently
from
November 7, 2023 12:10
513dcb9
to
34a28fe
Compare
TheSofox
force-pushed
the
undo-history-sync-fix
branch
2 times, most recently
from
November 7, 2023 19:27
7f05bb2
to
0fe4b8b
Compare
KoBeWi
reviewed
Nov 9, 2023
akien-mga
changed the title
Fix for stopping the Undo History being desynchronised from actual Undo queue. Fix Issue #83945
Fix for stopping the Undo History being desynchronised from actual Undo queue
Nov 10, 2023
TheSofox
force-pushed
the
undo-history-sync-fix
branch
2 times, most recently
from
November 10, 2023 09:43
6d98b47
to
d40a3e8
Compare
TheSofox
force-pushed
the
undo-history-sync-fix
branch
from
November 10, 2023 13:04
d40a3e8
to
662522a
Compare
KoBeWi
approved these changes
Nov 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't believe it was always this simple to handle 🤦♂️
AThousandShips
approved these changes
Nov 10, 2023
Thanks! |
akien-mga
changed the title
Fix for stopping the Undo History being desynchronised from actual Undo queue
Fix for stopping the Undo History being desynchronized from actual Undo queue
Nov 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for Issue #83945
The Undo History was getting desynched from the actual Undo queue. The reason is that the editor_undo_redo_manager.cpp (which handles History) and undo_redo.cpp (which handles actual Undo functionality) did their own parallel checks for whether the latest action should be merged with the previous one.
My fix eliminates the checks in editor_undo_redo_manager.cpp and simply queries undo_redo as to whether it merged the latest action. If so, it doesn't create a new action in the History list.
This ensures the two don't get desynched from different ideas about merging, and also future proofs it. Since all the rules for merging are in undo_redo.cpp, they can be changed there without having to also change the rules in editor_undo_redo_manager.cpp (DRY principal)
Production edit: Fixes #83945