Skip to content
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 extra check on project close for any layer in edit mode with unsaved edits #334

Closed
wants to merge 1 commit into from

Conversation

dakcarto
Copy link
Member

…ved edits

- Ensures user has opportunity to save provider edits
- Make project dirty if any unsaved edits found
- Add red notification to project save prompt dialog, and set Cancel to default
- Fix for qgis#6054 and qgis#6732
@dakcarto
Copy link
Member Author

Hi,

I sent this in as a pull request because I thought someone might desire it to be implemented in a different way (like always making the project dirty on provider edit). I think it is good as is, since it communicates to the user specifically what they may lose if continuing to close a project.

Editing a layer's provider data does not always seem to make the project dirty, then users may lose edits on unprompted project close. Since editing provider data is separate to edits a user may have done specifically to the project, when prompted that the project is dirty on close, the user may not realize why the project needs saved (this fixes that by adding a notification).

Also, after such a dirty-project-only prompt, saving and closing the project will NOT save the provider edits, leading to unanticipated loss of editing. I do not think attempting to auto-save provider data edits on project close is a good idea. Merely warning the user that the issue exists should suffice.

I'll wait a couple of days. If no one has any issue with it, I'll merge it.

notification in dialog

@dakcarto
Copy link
Member Author

Added with direct commit 21370d9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant