Modify

Opened 3 years ago

Closed 2 weeks ago

Last modified 2 weeks 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 Changed 3 years ago by skyper

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.

comment:2 in reply to:  description Changed 3 years ago by Klumbumbus

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 Changed 3 years ago by Klumbumbus

similar to #11056

comment:4 Changed 2 weeks ago by Don-vip

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!

comment:5 in reply to:  4 Changed 2 weeks ago by Klumbumbus

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 Changed 2 weeks ago by Don-vip

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 Changed 2 weeks ago by Klumbumbus

OK

comment:8 Changed 2 weeks ago by Klumbumbus

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 Changed 2 weeks ago by stoecker

In 13072/josm:

see #10832 - set proper help text link

comment:10 Changed 2 weeks ago by stoecker

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 in reply to:  10 Changed 2 weeks ago by Klumbumbus

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.