Modify

Opened 9 years ago

Closed 6 years ago

Last modified 6 years ago

#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 skyper, 9 years ago

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.

in reply to:  description comment:2 by Klumbumbus, 9 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.

comment:3 by Klumbumbus, 9 years ago

similar to #11056

comment:4 by Don-vip, 6 years ago

Resolution: worksforme
Status: newclosed

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!

in reply to:  4 comment:5 by Klumbumbus, 6 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 Don-vip, 6 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:7 by Klumbumbus, 6 years ago

OK

comment:8 by Klumbumbus, 6 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!?

comment:9 by stoecker, 6 years ago

In 13072/josm:

see #10832 - set proper help text link

comment:10 by stoecker, 6 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.

in reply to:  10 comment:11 by Klumbumbus, 6 years ago

Replying to stoecker:

You can find the automatic names here: DevelopersGuide/HelpSystem/HelpTopicsList.

OK, that helps.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.