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

QGIS 1.8 doesn't warn about unsaved changes in layers on exit anymore #15417

Closed
qgib opened this issue Jul 16, 2012 · 16 comments
Closed

QGIS 1.8 doesn't warn about unsaved changes in layers on exit anymore #15417

qgib opened this issue Jul 16, 2012 · 16 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jul 16, 2012

Author Name: Borys Jurgiel (@borysiasty)
Original Redmine Issue: 6054
Affected QGIS version: 1.8.0
Redmine category:gui


The title is self-explaining



Related issue(s): #15446 (duplicates)
Redmine related issue(s): 6101


@qgib
Copy link
Contributor Author

qgib commented Jul 17, 2012

Author Name: Giovanni Manghi (@gioman)


Hi Borys, is this a regression? If yes please tag the ticket as blocker.

@qgib
Copy link
Contributor Author

qgib commented Jul 17, 2012

Author Name: Borys Jurgiel (@borysiasty)


Yes, it's a regression. QGIS <= 1.7 used to warn at exit, if there were any unsaved changes in layers (I mean the layer contents. The unsaved project warning works ok). Now it exits quietly, losing the changes.

Note that when removing a layer from the TOC, the warning works ok.


  • priority_id was changed from High to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2012

Author Name: Alexander Bruy (@alexbruy)


Seems this caused by 8d4a656 (author Tim). As I understand, the reason to not emit signal is performance improvement. Here is small patch that should fix this.


  • 4933 was configured as fix_6054.patch

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2012

Author Name: Giovanni Manghi (@gioman)


Alexander Bruy wrote:

Seems this caused by 8d4a656 (author Tim). As I understand, the reason to not emit signal is performance improvement. Here is small patch that should fix this.

Hi Alexander, maybe is better to make a pull request on github... it will have more chances to have the patch added upstream as soon as possible.


  • pull_request_patch_supplied was changed from 0 to 1

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2012

Author Name: Alexander Bruy (@alexbruy)


Giovanni Manghi wrote:

Hi Alexander, maybe is better to make a pull request on github... it will have more chances to have the patch added upstream as soon as possible.

OK, I'll create a pull request, but IMO it is better to discuss this changes with Tim and Jurgen (original authors of this commit) first. I think they have reasons to disable this signal

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2012

Author Name: Alexander Bruy (@alexbruy)


Pull request is here #263

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2012

Author Name: Tim Sutton (Tim Sutton)


Hi

Yes there is a good reason to update this signal - if you have a plugin or other code that reacts to each layer removal event, it can lead to terrible performance problems when you remove many layers at once. So now we rather say layers added (list) or layers removed(list) and listener code can respond to one event and deal with all those removed layers.

Tim

@qgib
Copy link
Contributor Author

qgib commented Nov 20, 2012

Author Name: Larry Shaffer (Larry Shaffer)


Hi,

I have implemented a version of this here:
#333

'Add option to warn on project close if any layer is in edit mode with unsaved edits'

It does not address the layer legend edit issue, but does address (I think) the original issue concern.

@qgib
Copy link
Contributor Author

qgib commented Nov 20, 2012

Author Name: Larry Shaffer (Larry Shaffer)


Better implementation here:

#334


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2012

Author Name: Larry Shaffer (Larry Shaffer)


Should be fixed (regarding layer edits) with commit 21370d9

Attached is warning shown on project close if there are unsaved provider edits.

It does not address the layer legend edit issue (needs different ticket?), but does address the original issue concern.


  • 5109 was configured as unsaved-provider-edits.png
  • resolution was changed from to fixed

@qgib
Copy link
Contributor Author

qgib commented Nov 26, 2012

Author Name: Regis Haubourg (@haubourg)


Hi Larry , it works! but I got trapped going too fast. The warning dialog may be a bit confusing. It warns you to save your edits, and just under it there is a save button. I jumped on it (a beautiful neuronal shortcut).. and it saved project only and not layers. I guess users do not read really well those messages like me.. Is there a way to open dialogs to save edits of all layers being edited? (this is the most common behaviour in other softs).
If not, I would just put warning red line in first position, and then propose a "Save project anyway?" on top of the three standars buttons.)
Thanks a lot again
Régis

@qgib
Copy link
Contributor Author

qgib commented Nov 26, 2012

Author Name: Larry Shaffer (Larry Shaffer)


Hi Régis,

regis Haubourg wrote:

... Is there a way to open dialogs to save edits of all layers being edited? (this is the most common behaviour in other softs).

I think this would be handy, but a bit redundant. The layers are already listed in the legend with an edit icon. Other GUI items, like the layer's edit undo stack are already available in the main interface. Even if the dialog was more robust (offering saving of edited layers), I envision users looking at a layer listing and not remembering what they were editing, then cancelling the dialog to get back to the main interface to refresh their memory about the state of their edits (I know I do). I think just a more prominent warning and layer listing is all that is needed for now.

Ideally, having the legend layer's icon shift to a different version, or have the layer's text turn a different color, to indicate a layer has unsaved edits, would be helpful (not just for after cancelling project close prompt).

If not, I would just put warning red line in first position, and then propose a "Save project anyway?" on top of the three standars buttons.)

I have reformatted the notification and made it a separate dialog presented just before project save dialog (so as not to be confused with it). It also shows a layer listing in the same order as the legend to help understand which layers are affected, in case they are hidden in collapsed groups. See attachment:unsaved-provider-edits_2.png

If a user ignores the new dialog's WARNING, and loses edits... IMHO, they will learn to read such a dialog in the future. It no longer looks like the project close dialog and is very straightforward.

Caveat (or feature): there are now sometimes two dialogs to click through to close the project. While occasionally annoying, having project close dialog come after the 'layer edits exist' notification reduces the chance of the user accidentally/quickly clicking to dismiss a single dialog, thereby protecting against layer editing loss. Though, there are still times where the layer edits don't trigger a dirty project and the 'layer edits exist' notification dialog is the only one.

Note: not committed yet.


  • 5114 was configured as unsaved-provider-edits_2.png

@qgib
Copy link
Contributor Author

qgib commented Nov 26, 2012

Author Name: Regis Haubourg (@haubourg)


+1 for me, I agree with your analysis, mine was maybe too quickly made. You can go for new dialog for me. Do other users have feedback on that point?

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2012

Author Name: Giovanni Manghi (@gioman)


can we close this ticket?

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2012

Author Name: Larry Shaffer (Larry Shaffer)


The current fix addresses the issue, but I am currently working on an integrated dialog to allow saving the unsaved edits, closing the project, or both (not a two-dialog approach as previously noted).

However, that is an additional feature beyond fixing this issue, so I'm closing the issue. Please reopen if needed.


  • status_id was changed from Feedback to Resolved

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2012

Author Name: Larry Shaffer (Larry Shaffer)


  • status_id was changed from Resolved to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

No branches or pull requests

1 participant