Modify

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 gaben)

What steps will reproduce the problem?

  1. Have a new layer with some data
  2. Save it
  3. Mark it as "Discourage upload"
  4. 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 gaben, 3 weeks ago

Description: modified (diff)

comment:2 by GerdP, 3 weeks ago

Hit the same problem in the last days.

OR the upload attribute automatically propagated to the file without user intervention.

I wouldn't want that.

comment:3 by GerdP, 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

     
    11951195        if (data.getUploadPolicy() != UploadPolicy.BLOCKED &&
    11961196                (uploadDiscouraged ^ isUploadDiscouraged())) {
    11971197            data.setUploadPolicy(uploadDiscouraged ? UploadPolicy.DISCOURAGED : UploadPolicy.NORMAL);
     1198            setRequiresSaveToFile(true);
    11981199            for (LayerStateChangeListener l : layerStateChangeListeners) {
    11991200                l.uploadDiscouragedChanged(this, uploadDiscouraged);
    12001201            }

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to gaben.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.