Opened 9 years ago
Last modified 5 years 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)
Change History (11)
comment:2 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!
by , 7 years ago
by , 7 years ago
follow-up: 4 comment:3 by , 7 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
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:
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.
comment:4 by , 7 years ago
Replying to naoliv:
clicking at
1
and then clicking at2
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.
comment:5 by , 7 years ago
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)
by , 7 years ago
Attachment: | delete-layer.ogv added |
---|
comment:6 by , 5 years ago
It looks like this problem is fixed together with #17350
I load the attached {{test.osm}} file and do a modification. After selecting the layer and pressing {{delete}} or use the {{Delete selected Layer}} action, the "Unsaved changes" dialog pops up with upload=false and save=true.
comment:7 by , 5 years ago
The problem that sometimes delete cause the expected warning dialog and sometimes delete with no dialog was exactly the problem fixed with #17350: it depends on autosave has saved the layer or not in the background.
I think we already have a ticket for this,
but I cannot find it.ticket:10832#comment:2