#10832 closed enhancement (worksforme)
Too easy to delete layers using the delete key
Reported by: | sanderd17 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
IMO, it's too easy to delete layers by using the delete key.
I often press delete in order to delete a node or a way, but because I switched layers as the last action, a layer is deleted instead. This is certainly an issue when I'm editing layers which have the upload="no" flag set. Then an important data layer can be deleted without notice. There are multiple solutions possible:
- Don't let delete remove layers. IMO, removing layers isn't a common action (not nearly as common as removing nodes or ways, and also less common as removing tags). There's still the trash-button that can be used. I think, this is the best solution
- Warn when you delete data layers, even when upload="no" is set: upload="no" doesn't mean you can't edit data, and you should be warned when you remove manually edited data without saving or uploading. In this case, only the save action could be proposed.
- Implementing an undo action for the deletion of layers: This might solve the problems, but it might also cause other problems. F.e. someone might want to delete a layer because it uses too much memory, but when you can undo a deletion, the memory won't be freed (most likely).
All implementations could be combined, and when implemented, they will save work in some different cases.
Thanks for considering this request.
Attachments (0)
Change History (11)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to sanderd17:
- Warn when you delete data layers, even when upload="no" is set: upload="no" doesn't mean you can't edit data, and you should be warned when you remove manually edited data without saving or uploading. In this case, only the save action could be proposed.
+1. It is also a problem when you close JOSM and there are unsaved non-upload-datalayers, you do not get a warning.
follow-up: 5 comment:4 by , 7 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I tested several ancient versions up to r9329 and it works as expected, you get the warning when deleting an upload=false layer with unsaved data. But the flag has to be set before opening the file!
comment:5 by , 7 years ago
Replying to Don-vip:
But the flag has to be set before opening the file!
Setting the upload false flag during a session and then deleting the layer or closing JOSM is the "dangerous" use case to loose data. Can't JOSM detect unsaved layers even when the flag was set during the session?
comment:6 by , 7 years ago
It could, but it would add too much complexity for little gain. We can simply document the fact that changing the flag while having the file open is not supported.
comment:8 by , 7 years ago
I created Help/Action/EncourageDiscourageUpload, however I'm not sure if context sensitive help within JOSM is available for this action and points somewhere else!?
follow-up: 11 comment:10 by , 7 years ago
You can find the automatic names here: DevelopersGuide/HelpSystem/HelpTopicsList. Each action has an automatic help name and usually it is better to use this and not to invent new ones.
comment:11 by , 7 years ago
Replying to stoecker:
You can find the automatic names here: DevelopersGuide/HelpSystem/HelpTopicsList.
OK, that helps.
Major problem I encounter myself is the focus behaviour which needs a click to switch.
If you load a file and change it, I would expect to get the upload/save dialog represented asking to save my changes.
The option to "always ask to save modified files" should be available, already.