Changeset 18278 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
- Timestamp:
- 2009-10-25T20:48:47+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
r18256 r18278 38 38 @Override public void enterMode() { 39 39 if (Main.map != null) { 40 selectedLayer = null; 41 WMSLayer possibleLayer = null; 42 int cRasterLayers = 0; 43 for (Layer l : Main.map.mapView.getAllLayers()) { 44 if (l instanceof WMSLayer && ((WMSLayer)l).isRaster()) { 45 possibleLayer = (WMSLayer)l; 46 cRasterLayers++; 47 } 48 } 40 49 Layer activeLayer = Main.map.mapView.getActiveLayer(); 41 50 if (activeLayer instanceof WMSLayer && ((WMSLayer)activeLayer).isRaster()) { 51 selectedLayer = (WMSLayer)activeLayer; 52 } else if (cRasterLayers == 1) { 53 selectedLayer = possibleLayer; 54 } 55 if (selectedLayer != null) { 42 56 super.enterMode(); 43 57 Main.map.mapView.addMouseListener(this); 44 58 Main.map.mapView.addMouseMotionListener(this); 45 59 rasterMoved = false; 46 selectedLayer = (WMSLayer)activeLayer;47 60 } else { 48 61 JOptionPane.showMessageDialog(Main.parent,tr("This mode works only if active layer is\n"
Note:
See TracChangeset
for help on using the changeset viewer.
