-
Notifications
You must be signed in to change notification settings - Fork 96
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
Refactor Undo/Redo #1060
Comments
As of this writing, we have moved the AppTools Undo/Redo into Pyface and made a release with this change, so it is now easily available to TraitsUI. There is also #1510 pending, which adds testing, bugfixes, and makes the The next step after this is probably to integrate an One slight mismatch between the APIs is how to group multiple commands into a single command that can be performed with one undo/redo action. The Pyface Undo/Redo handles this with the The final change is more substantive, and should perhaps be done as part of the effort for the Traits 8 release. Currently Eventually it should be possible to retire |
Fixes #1515. Also removes a no-longer used `history` trait. This completes the transition of TraitsUI undo/redo to share the same basis as the Pyface/Apptools undo/redo. There is still an issue in #1060 that is unresolved which is about refactoring TraitsUI to be more command-stack based, rather than building the command stack reactively.
The undo/redo code is not particularly clean or well-written. It is also not API-compatible with the apptools Undo/Redo system.
A proper re-write might mean bringing apptools Undo/Redo into Pyface (at least the core, but possibly all of it, so it can be used there) and then making the TraitsUI implement or adapt to the API for its undo/redo, so that it can integrate with application-level undo/redo.
While I suspect that this code is not heavily used externally to TraitsUI, there may need to take some care not to break the API exposed to editors and handlers without a clear migration path.
The text was updated successfully, but these errors were encountered: