Modify

Opened 5 years ago

Closed 5 years ago

#18244 closed defect (duplicate)

No warning on closing unsaved edits in layers with upload=never flag

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: save upload autosave Cc:

Description (last modified by Don-vip)

First the use case: In Switzerland we can use GWR address data. Simon Poole has preprocessed files with these data: http://qa.poole.ch/addresses/ch/. If you download an .osm file (link 'O', unpack zip) you can load such a file as a separate layer. Now I copy and delete an address from that layer, switch to the data layer and past the address to the building.

I got two problems with layers loaded from file. The first is more for completeness:
If I only load the GWR.osm file and change something, the File.Save menu will be enabled (ok), but when I close the modified layer in the Layers view, it is closed without and warning. But I would expect a warning that I'm about to loose edits.

The second problem is much more annoying:
Download an area into a data layer. Additionally load the GWR.osm file. Edit on both layers. If I now activate the GWR data layer and go to the file menu, Save is disabled! You could save the data with Save as... and hopefully choose the right file to override. The changes are recognized: choose Info about the GWR data layer and you will see your edits in that layer. After uploading the data (from the data layer), the edits in the GWR data file are still not saved, Save is disabled and the edits got lost without warning on closing the layer or JOSM.

Perhaps this has to do with upload='never' flag in the .osm file.

But I would expect, that at least File.Save is enabled for this layer and that I got a warning about unsaved data on deleting the layer or leaving JOSM.

Attachments (0)

Change History (16)

comment:1 by Don-vip, 5 years ago

Please always attach your status report. Defects without JOSM version are almost useless, I changed the save logic recently and I don't know if you have this change.

comment:2 by Don-vip, 5 years ago

Owner: changed from team to mdk
Status: newneedinfo

comment:3 by mdk, 5 years ago

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-10-19 21:14:00 +0200 (Sat, 19 Oct 2019)
Revision:15466
Build-Date:2019-10-20 01:30:54
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (15466 en) Linux Ubuntu 19.04
Memory Usage: 434 MB / 1984 MB (164 MB allocated, but free)
Java version: 11.0.4+11-post-Ubuntu-1ubuntu219.04, Ubuntu, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-11-jre:amd64-11.0.4+11-1ubuntu2~19.04
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-21
libcommons-compress-java: libcommons-compress-java:all-1.18-2
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
VM arguments: [-Djosm.restart=true, -Djosm.dir.name=JOSM-latest, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
+ ColumbusCSV (34985)
+ FastDraw (34977)
+ HouseNumberTaggingTool (34977)
+ OpeningHoursEditor (34977)
+ RoadSigns (UNKNOWN)
+ SimplifyArea (34977)
+ buildings_tools (35171)
+ contourmerge (v0.1.4)
+ imagery-xml-bounds (35100)
+ imagery_offset_db (34908)
+ pbf (35033)
+ poly (34991)
+ public_transport (34977)
+ reltoolbox (34977)
+ reverter (35084)
+ terracer (34977)
+ turnrestrictions (34977)
+ utilsplugin2 (35177)
+ wikipedia (1.1.2)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Cannot start IPv4 remotecontrol https server on port 8112: Keystore was tampered with, or password was incorrect
- W: Cannot start IPv6 remotecontrol https server on port 8112: Keystore was tampered with, or password was incorrect
Last edited 5 years ago by Don-vip (previous) (diff)

comment:4 by Don-vip, 5 years ago

Owner: changed from mdk to team
Status: needinfonew

Thanks

comment:5 by Don-vip, 5 years ago

Keywords: save added

in reply to:  description comment:6 by Don-vip, 5 years ago

Replying to mdk:

Download an area into a data layer. Additionally load the GWR.osm file. Edit on both layers. If I now activate the GWR data layer and go to the file menu, Save is disabled!

I can't reproduce this part. Are you sure you didn't forget a step? Save is always enabled for me.

comment:7 by mdk, 5 years ago

Did you activate the GWR layer in the Layers view? Set the green checkmark "this layer is not currently active (click to active)".

comment:8 by Don-vip, 5 years ago

Yes. But probably I don't understand the steps as you think you explained them. Can you please share a video?

comment:9 by mdk, 5 years ago

I'm very sorry, but yesterday I had this problem all the time, but now I can't reproduce it. Yesterday the changeset was created with JOSM/1.5 (15462 en). Today I have 15466. Normally I like the Linux auto update, but in this case ...
Sorry for wasting your time!

comment:10 by Don-vip, 5 years ago

Description: modified (diff)
Keywords: upload added
Summary: No warning on closing unsaved edits in layers loaded from fileNo warning on closing unsaved edits in layers with upload=never flag
Type: enhancementdefect

OK so there's only one problem, the missing save warning for layers with upload=never

comment:11 by Don-vip, 5 years ago

One good thing when writing step-by-steps bug reports is actually to reproduce the bug yourself while writing the report, and not from memory. This way you will be sure to not forget a step that will make me lose time to wonder what else has to be done.

comment:12 by mdk, 5 years ago

Yes, I should know. And even the other problem I can't reproduce. Now the expected Save dialog comes up. So you could close the issue, or could you reproduce it? I'm quite confused, because when I start mapping today, I missed some validator messages (like overlapping areas or track without tracktype), but now also this problem vanish. I produced a test file today. I could reproduce the error. All with 15466! But now all works again - strange.

Again: I'm very sorry.

comment:13 by mdk, 5 years ago

I played around and the problem still exists. But it appears and disappears without and pattern. I will observe the problem and if I could reproduce it, I will add the info here. I thought, the problem would always be there, but now I see, that there must be more complex reason for this.

comment:14 by mdk, 5 years ago

I think I got it!

Steps to reproduce:

  • load any file -> File.Save is disabled (OK)
  • do any modification -> File.Save is enabled (OK)
  • Open File Menu and wait - after a wile File.Save will be disabled without any interaction of the user. (not ok)

Without knowing the code I assume, that there are two modified flags for each layer: one for upload and one for saving as file. Both flags are set on any modification, but the file_modified flag is cleaed on save and the upload_modified flag is cleared an upload.

Question: Does AutoSave clears the file_modified flag?

If so, we need a third flag: autosave_modified, because we have a third destination

  • original file location
  • autosave file location
  • update on server

comment:15 by Klumbumbus, 5 years ago

Modified layers with upload=never or upload=false should always display the unsaved changes dialog in my opinion. Current behavior according wiki:/Help/Action/EncourageDiscourageUpload "you'll only get a warning about unsaved changes of layers with the states false or never if the state was already set in the osm file before adding the layer to JOSM."

in reply to:  14 comment:16 by Don-vip, 5 years ago

Keywords: autosave added
Resolution: duplicate
Status: newclosed

Closed as duplicate of #17350.
Replying to mdk:

after a wile File.Save will be disabled without any interaction of the user. (not ok)

ok, duplicate of #17350

I agree, it needs to be fixed

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.