-
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor undo/redo system to track separate object changes (#2320)
`UndoManager`, previously used by the editor, has been removed, and the undo/redo functionality has been migrated to `GameObjectManager`, where the approach taken to save and reproduce object changes is to track each `GameObject`'s data separately. The new object tracking system can only be enabled inside sectors, which take place in the editor, and can also manually be turned on/off by the user. The maximum amount of saved changes in the undo stack can also be changed by the user. The undo stack is cleaned up when pushing to it and when setting a new maximum limit to undo stack changes. The virtual `save_state()` and `check_state()` `GameObject` functions can be overriden, meaning that markers or more complex objects can also save other objects' states, so they can be tracked. Closes #1108. Fixes #1688. Closes #1954. Fixes #2297.
- Loading branch information
1 parent
2483e27
commit 444d264
Showing
34 changed files
with
701 additions
and
404 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.