Project recovery dialog improvements #1944
Open
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.
Initially this was a fix for the 'x' button of the project recovery dialog not doing anything, however I ended up adding a couple other changes at the same time. There is now a Cancel option in that dialog which will ignore the unrecovered project until next time the program is started. This is an important option when running multiple Pencil2D instances (which you shouldn't do!), and it is in my opinion the most appropriate behavior to take when a user dismisses the dialog without explicitly choosing to open or delete the unrecovered project. This is also now the button that receives focus by default so if the user happens to press enter before reading the dialog, no harm is done.
I also have added support for handling multiple unrecovered projects. Previously, a dialog would only show up for the first unrecovered project, but now it show a dialog for every unrecovered project unless the user has opened one for recovery. It's not the most elegant solution, but it's not a situation that should come up often.