Changeset 4833 in josm for trunk


Ignore:
Timestamp:
2012-01-21T11:27:17+01:00 (13 years ago)
Author:
simon04
Message:

fix #5324 - remotecontrol: add ways (e.g., /add_way?way=lat1,lon2;lat2,lon2)

Location:
trunk/src/org/openstreetmap/josm/io/remotecontrol
Files:
1 added
3 edited

Legend:

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

    r4798 r4833  
    1616
    1717import org.openstreetmap.josm.io.remotecontrol.handler.AddNodeHandler;
     18import org.openstreetmap.josm.io.remotecontrol.handler.AddWayHandler;
    1819import org.openstreetmap.josm.io.remotecontrol.handler.ImageryHandler;
    1920import org.openstreetmap.josm.io.remotecontrol.handler.ImportHandler;
     
    116117        addRequestHandlerClass(ImageryHandler.command, ImageryHandler.class, true);
    117118        addRequestHandlerClass(AddNodeHandler.command, AddNodeHandler.class, true);
     119        addRequestHandlerClass(AddWayHandler.command, AddWayHandler.class, true);
    118120        addRequestHandlerClass(ImportHandler.command, ImportHandler.class, true);
    119121        addRequestHandlerClass(VersionHandler.command, VersionHandler.class, true);
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java

    r3707 r4833  
    55
    66import java.util.HashMap;
    7 
    87import org.openstreetmap.josm.Main;
     8import org.openstreetmap.josm.actions.AutoScaleAction;
    99import org.openstreetmap.josm.command.AddCommand;
    1010import org.openstreetmap.josm.data.coor.LatLon;
     
    3838
    3939    @Override
    40     public PermissionPrefWithDefault getPermissionPref()
    41     {
     40    public PermissionPrefWithDefault getPermissionPref() {
    4241        return new PermissionPrefWithDefault(permissionKey, permissionDefault,
    4342                "RemoteControl: creating objects forbidden by preferences");
     
    6261        Main.main.undoRedo.add(new AddCommand(nnew));
    6362        Main.main.getCurrentDataSet().setSelected(nnew);
    64         Main.map.mapView.repaint();
     63        if (Main.pref.getBoolean(LoadAndZoomHandler.changeViewportPermissionKey, LoadAndZoomHandler.changeViewportPermissionDefault)) {
     64            new AutoScaleAction("selection").actionPerformed(null);
     65        } else {
     66            Main.map.mapView.repaint();
     67        }
    6568    }
    6669}
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java

    r4799 r4833  
    11package org.openstreetmap.josm.io.remotecontrol.handler;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.util.LinkedList;
     
    3840    @Override
    3941    public String getPermissionMessage() {
    40         return "";
     42        return tr("Remote Control has been asked to load objects (specified by their id) from the API.");
    4143    }
    4244}
Note: See TracChangeset for help on using the changeset viewer.