Changeset 8249 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-04-23T18:32:29+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
r8197 r8249 33 33 protected void handleRequest() throws RequestHandlerErrorException { 34 34 try { 35 if (Main.pref.getBoolean("remotecontrol.import.interactive", true)) { 35 if (suitableDownloadTasks.isEmpty()) { 36 // It should maybe be better to reject the request in that case ? 37 // For compatibility reasons with older instances of JOSM, arbitrary choice of DownloadOsmTask 38 // As of 2015-04, Overpass Turbo requires this branch of code ... 39 Main.debug("Remote control, /import: defaulting to DownloadOsmTask"); 40 new DownloadOsmTask().loadUrl(isLoadInNewLayer(), url.toExternalForm(), null); 41 } else if (Main.pref.getBoolean("remotecontrol.import.interactive", true)) { 36 42 // OpenLocationAction queries the user if more than one task is suitable 37 43 new OpenLocationAction().openUrl(isLoadInNewLayer(), url.toExternalForm()); … … 105 111 // Find download tasks for the given URL 106 112 suitableDownloadTasks = Main.main.menu.openLocation.findDownloadTasks(urlString, true); 107 if (suitableDownloadTasks.isEmpty()) {108 // It should maybe be better to reject the request in that case ?109 // For compatibility reasons with older instances of JOSM, arbitrary choice of DownloadOsmTask110 suitableDownloadTasks.add(new DownloadOsmTask());111 }112 113 } 113 114 }
Note:
See TracChangeset
for help on using the changeset viewer.