Changeset 34342 in osm for applications/editors/josm
- Timestamp:
- 2018-06-22T23:57:45+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
r34208 r34342 47 47 import org.openstreetmap.josm.gui.MapFrame; 48 48 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 49 import org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer; 49 50 import org.openstreetmap.josm.gui.layer.GpxLayer; 50 51 import org.openstreetmap.josm.gui.layer.ImageryLayer; … … 76 77 static final String pluginDir = Main.pref.getPluginsDirectory().getAbsolutePath() + "/CommandLine/"; 77 78 78 @SuppressWarnings("serial")79 79 public CommandLine(PluginInformation info) { 80 80 super(info); … … 282 282 Layer olayer = MainApplication.getLayerManager().getActiveLayer(); 283 283 if (olayer != null) { 284 if (!(olayer instanceof ImageryLayer)) { 285 List<ImageryLayer> imageryLayers = MainApplication.getLayerManager().getLayersOfType(ImageryLayer.class); 284 if (!(olayer instanceof AbstractTileSourceLayer)) { 285 @SuppressWarnings("rawtypes") 286 List<AbstractTileSourceLayer> imageryLayers = MainApplication.getLayerManager().getLayersOfType( 287 AbstractTileSourceLayer.class); 286 288 if (imageryLayers.size() == 1) { 287 289 olayer = imageryLayers.get(0); … … 292 294 } 293 295 } 294 loadParameter((String.valueOf(((ImageryLayer) olayer).getDx()) + "," + String.valueOf(((ImageryLayer) olayer).getDy())), true); 296 loadParameter((String.valueOf(((AbstractTileSourceLayer<?>) olayer).getDisplaySettings().getDx()) + "," + 297 String.valueOf(((AbstractTileSourceLayer<?>) olayer).getDisplaySettings().getDy())), true); 295 298 action = new DummyAction(this); 296 299 break;
Note:
See TracChangeset
for help on using the changeset viewer.