Modify

Opened 3 years ago

Last modified 16 months ago

#12483 reopened defect

Should not silently delete layers with upload=false

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

I was editing some data and manually changed upload='true' to upload='false' in the osm file, to avoid uploading it unintentionally (while the tracing and everything else wasn't complete yet).

Then, I pressed Delete, thinking that I had one object selected, but actually had the data layer selected.
And JOSM silently deleted the layer...

JOSM should also warn that the layer has modified data, even if it has upload='false'.

It should, of course, not offer to upload the data, but should give a warning and option to save it, instead silently deleting the layer.

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-02-01 23:47:27 +0100 (Mon, 01 Feb 2016)
Build-Date:2016-02-02 02:32:58
Revision:9711
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9711 pt_BR) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 1040 MB / 3641 MB (804 MB allocated, but free)
Java version: 1.8.0_72-internal-b15, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems foundURL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-02-01 23:47:27 +0100 (Mon, 01 Feb 2016)
Build-Date:2016-02-02 02:32:58
Revision:9711
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9711 pt_BR) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 1040 MB / 3641 MB (804 MB allocated, but free)
Java version: 1.8.0_72-internal-b15, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Attachments (3)

test.osm (156.9 KB) - added by naoliv 16 months ago.
video.ogv (3.1 MB) - added by naoliv 16 months ago.
delete-layer.ogv (113.3 KB) - added by naoliv 16 months ago.

Change History (8)

comment:1 Changed 3 years ago by Klumbumbus

I think we already have a ticket for this, but I cannot find it. ticket:10832#comment:2

Last edited 3 years ago by Klumbumbus (previous) (diff)

comment:2 Changed 16 months 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!

Changed 16 months ago by naoliv

Attachment: test.osm added

Changed 16 months ago by naoliv

Attachment: video.ogv added

comment:3 Changed 16 months ago by naoliv

Resolution: worksforme
Status: closedreopened

I can reproduce the problem. Not always nor in a scientific way, but I can.
Open the attached example file. Draw some area just for test.

What I could observe is that if I select the layer clicking at 1 and then clicking at 2 to unselect it, sometimes JOSM allows me to delete the layer without any warning:

https://i.imgur.com/RBoxa6K.png

See the attached video also. I was trying to delete the layer and JOSM kept asking to save or upload it. But one time it just deleted it, without any warning.

Last edited 16 months ago by naoliv (previous) (diff)

comment:4 in reply to:  3 Changed 16 months ago by Don-vip

Replying to naoliv:

clicking at 1 and then clicking at 2 to unselect it

This is odd. Only with Metal look-and-feel, or also with GTK? With Windows l&f, clicking on 2 does not unselect the layer. But even with Metal, I cannot unselect the layer.

Last edited 16 months ago by Don-vip (previous) (diff)

comment:5 Changed 16 months ago by naoliv

With GTK I can reproduce the same behavior: sometimes JOSM allows to delete the layer without asking anything.

And this thing will be hard to explain, I guess :-)
While visually the layer is selected, if seems/feels that it "unselects" it.
Maybe you can see this if you download multiple times the same area as new layers. Select one layer and keep pressing Delete.
Sometimes JOSM selects the next layer and allows you to also delete it. Sometimes it just stops to delete the layer.

See the new example video, where I have downloaded the same area 12 times, without modifying anything.
If I select the first downloaded layer (Data Layer 1) and delete it, JOSM focus at the top layer (Data Layer 12); if I press Delete again, JOSM deletes it and focus at the next one (Data Layer 11). If I press Delete again JOSM doesn't delete the layer (as if it is not selected anymore)

Changed 16 months ago by naoliv

Attachment: delete-layer.ogv added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to naoliv
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment


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

 
Note: See TracTickets for help on using tickets.