-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add function to autosave the project #217
Conversation
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.
There's a few changes I'd like to see with what's currently submitted and some ideas on where to go from there.
I have addressed most of the comments. One thing I haven't figured out yet is how to elegantly load any of the autosaves displayed in the menu. See the TODO I added to |
I have completed the code for properly opening autosaves from the recents menu as well as implementing the user settings panel for controlling the autosave behavior. This is now ready for additional review. |
Could this PR be rebased on the latest commit? if so then I'll merge it @pankern |
Ok, I will rebase this feature on the latest from main. |
- Separated out most of the autosave code into seperate files. - Autosaves are now stored in the app data directory. - Added a buffer list of the recent autosaves. - Added a per-project lockfile to indicate if there may be data not yet saved to the main save file. - Changed the autosave file name to include date and time. - Added a popup window to prompt the user to restore from a backup when appropriate.
This is so that when we open an autosave from the recents menu, we can still correctly set the current project path to be the main save file instead of the autosave file, and the user can continue to press Ctrl+S to have changes saved in the expected location.
Rebase on the latest main is completed. |
The autosaves are implemented here in a rolling backup fashion, such that the 10 most recent autosaves are kept. The autosaves don't overwrite the main save file. The changes include modifying the
incSaveProject
function in order to avoid adding the autosave files to the list of previous projects.I thought it would be good to get this PR going with what I have now so I could incorporate feedback sooner rather than later.
Things not included in this PR that will likely still be needed: