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
Comments
Author Name: Giovanni Manghi (@gioman) Hi Borys, is this a regression? If yes please tag the ticket as blocker. |
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.
|
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.
|
Author Name: Giovanni Manghi (@gioman) Alexander Bruy 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.
|
Author Name: Alexander Bruy (@alexbruy) Giovanni Manghi wrote:
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 |
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 |
Author Name: Larry Shaffer (Larry Shaffer) Hi, I have implemented a version of this here: '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. |
Author Name: Larry Shaffer (Larry Shaffer) Better implementation here:
|
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.
|
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). |
Author Name: Larry Shaffer (Larry Shaffer) Hi Régis, regis Haubourg wrote:
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).
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.
|
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? |
Author Name: Giovanni Manghi (@gioman) can we close this ticket? |
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.
|
Author Name: Larry Shaffer (Larry Shaffer)
|
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
The text was updated successfully, but these errors were encountered: