}
}
if (toDownload != null && toDownload.isEmpty()) {
Main.info("RemoteControl: no download necessary");
} else {
Future<?> future = osmTask.download(newLayer, new Bounds(minlat,minlon,maxlat,maxlon), null /* let the task manage the progress monitor */);
Main.worker.submit(new PostDownloadHandler(osmTask, future));
}
}
}
} catch (Exception ex) {
Main.warn("RemoteControl: Error parsing load_and_zoom remote control request:");
Main.error(ex);
throw new RequestHandlerErrorException(ex);
}
/**
* deselect objects if parameter addtags given
*/
if (args.containsKey("addtags")) {
GuiHelper.executeByMainWorkerInEDT(new Runnable() {
@Override
public void run() {
DataSet ds = Main.main.getCurrentDataSet();
if(ds == null) // e.g. download failed
return;
ds.clearSelection();
}
});
}
final Bounds bbox = new Bounds(minlat, minlon, maxlat, maxlon);
if (args.containsKey("select") && PermissionPrefWithDefault.CHANGE_SELECTION.isAllowed()) {
// select objects after downloading, zoom to selection.
GuiHelper.executeByMainWorkerInEDT(new Runnable() {
@Override
public void run() {