Opened 3 weeks ago
Last modified 3 weeks ago
#23648 new defect
Not possible to save a layer after marked as "Discourage upload"
Reported by: | gaben | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report upload discourage | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Have a new layer with some data
- Save it
- Mark it as "Discourage upload"
- Try to save it again
What is the expected result?
It's possible to save the layer OR the upload attribute automatically propagated to the file without user intervention.
What happens instead?
The save button greyed out. To save the upload=false attribute to the file, I need to make a change to the dataset, then the save button will be available and the attribute will be saved to the file.
Please provide any additional information below. Attach a screenshot if possible.
It was modified during #23506, #23408 and #22817.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2024-04-27 10:24:46 +0200 (Sat, 27 Apr 2024) Revision:19064 Build-Date:2024-04-28 01:31:14 URL:https://josm.openstreetmap.de/svn/trunk
Attachments (0)
Change History (3)
comment:1 by , 3 weeks ago
Description: | modified (diff) |
---|
comment:2 by , 3 weeks ago
comment:3 by , 3 weeks ago
BTW: the save action is still available in the context menu of the layer side window.
Proposed solution:
-
src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
1195 1195 if (data.getUploadPolicy() != UploadPolicy.BLOCKED && 1196 1196 (uploadDiscouraged ^ isUploadDiscouraged())) { 1197 1197 data.setUploadPolicy(uploadDiscouraged ? UploadPolicy.DISCOURAGED : UploadPolicy.NORMAL); 1198 setRequiresSaveToFile(true); 1198 1199 for (LayerStateChangeListener l : layerStateChangeListeners) { 1199 1200 l.uploadDiscouragedChanged(this, uploadDiscouraged); 1200 1201 }
Hit the same problem in the last days.
I wouldn't want that.