- Timestamp:
- 2015-04-18T16:54:05+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
r6973 r8221 49 49 public static void processItems(boolean newLayer, final List<PrimitiveId> ids, boolean downloadReferrers, boolean full) { 50 50 final DownloadPrimitivesWithReferrersTask task = 51 new DownloadPrimitivesWithReferrersTask(newLayer, ids, downloadReferrers, full, null );51 new DownloadPrimitivesWithReferrersTask(newLayer, ids, downloadReferrers, full, null, null); 52 52 Main.worker.submit(task); 53 53 Main.worker.submit(new Runnable() { -
trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
r7896 r8221 64 64 * i.e., parent relations, and for nodes, additionally, parent ways 65 65 * @param full if the members of a relation should be downloaded as well 66 * @param newLayerName the name to use for the new layer, can be {@code null}. 66 67 * @param monitor ProgressMonitor to use, or null to create a new one 67 68 */ 68 69 public DownloadPrimitivesWithReferrersTask(boolean newLayer, List<PrimitiveId> ids, boolean downloadReferrers, 69 boolean full, ProgressMonitor monitor) {70 boolean full, String newLayerName, ProgressMonitor monitor) { 70 71 super(tr("Download objects"), monitor, false); 71 72 this.ids = ids; … … 74 75 this.newLayer = newLayer; 75 76 // All downloaded primitives are put in a tmpLayer 76 tmpLayer = new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null);77 tmpLayer = new OsmDataLayer(new DataSet(), newLayerName != null ? newLayerName : OsmDataLayer.createNewName(), null); 77 78 } 78 79 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r7937 r8221 73 73 @Override 74 74 public String[] getOptionalParams() { 75 return new String[] {"new_layer", " addtags", "select", "zoom_mode", "changeset_comment", "changeset_source", "search"};75 return new String[] {"new_layer", "layer_name", "addtags", "select", "zoom_mode", "changeset_comment", "changeset_source", "search"}; 76 76 } 77 77 … … 102 102 @Override 103 103 protected void handleRequest() throws RequestHandlerErrorException { 104 DownloadTask osmTask = new DownloadOsmTask(); 104 DownloadTask osmTask = new DownloadOsmTask() { 105 { 106 newLayerName = args.get("layer_name"); 107 } 108 }; 105 109 try { 106 110 boolean newLayer = isLoadInNewLayer(); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
r7937 r8221 40 40 @Override 41 41 public String[] getOptionalParams() { 42 return new String[] {"new_layer", " addtags", "relation_members", "referrers"};42 return new String[] {"new_layer", "layer_name", "addtags", "relation_members", "referrers"}; 43 43 } 44 44 … … 64 64 final boolean newLayer = isLoadInNewLayer(); 65 65 final boolean relationMembers = Boolean.parseBoolean(args.get("relation_members")); 66 final boolean referrers = args.containsKey("referrers") ? Boolean.parseBoolean(args.get("referrers")) : true;66 final boolean referrers = Boolean.parseBoolean(args.get("referrers")); 67 67 final DownloadPrimitivesWithReferrersTask task = new DownloadPrimitivesWithReferrersTask( 68 newLayer, ps, referrers, relationMembers, null);68 newLayer, ps, referrers, relationMembers, args.get("layer_name"), null); 69 69 Main.worker.submit(task); 70 70 Main.worker.submit(new Runnable() {
Note:
See TracChangeset
for help on using the changeset viewer.