Ignore:
Timestamp:
2013-12-23T19:17:28+01:00 (10 years ago)
Author:
simon04
Message:

fix #9387 - remote control: add ability to add changeset tags

This extends the load_and_zoom handler by optional arguments changeset_comment and changeset_source.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java

    r6350 r6517  
    7373    @Override
    7474    public String[] getOptionalParams() {
    75         return new String[] {"new_layer", "addtags", "select", "zoom_mode"};
     75        return new String[] {"new_layer", "addtags", "select", "zoom_mode", "changeset_comment", "changeset_source"};
    7676    }
    7777
     
    200200            // after downloading, zoom to downloaded area.
    201201            zoom(bbox);
     202        }
     203
     204        // add changeset tags after download if necessary
     205        if (args.containsKey("changeset_comment") || args.containsKey("changeset_source")) {
     206            Main.worker.submit(new Runnable() {
     207                @Override
     208                public void run() {
     209                    if (Main.main.getCurrentDataSet() != null) {
     210                        if (args.containsKey("changeset_comment")) {
     211                            Main.main.getCurrentDataSet().addChangeSetTag("comment", args.get("changeset_comment"));
     212                        }
     213                        if (args.containsKey("changeset_source")) {
     214                            Main.main.getCurrentDataSet().addChangeSetTag("source", args.get("changeset_source"));
     215                        }
     216                    }
     217                }
     218            });
    202219        }
    203220
Note: See TracChangeset for help on using the changeset viewer.