Changeset 32425 in osm for applications/editors/josm
- Timestamp:
- 2016-06-28T23:22:36+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
r32211 r32425 48 48 import org.openstreetmap.josm.command.SequenceCommand; 49 49 import org.openstreetmap.josm.data.coor.EastNorth; 50 import org.openstreetmap.josm.data.osm.DataSet; 50 51 import org.openstreetmap.josm.data.osm.Node; 51 52 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 526 527 527 528 private static void setNewSelection(OsmPrimitive osm) { 528 Collection<OsmPrimitive> newSelection = new LinkedList<>(Main.main.getCurrentDataSet().getSelected()); 529 DataSet ds = Main.getLayerManager().getEditDataSet(); 530 Collection<OsmPrimitive> newSelection = new LinkedList<>(ds.getSelected()); 529 531 newSelection.clear(); 530 532 newSelection.add(osm); 531 getCurrentDataSet().setSelected(osm);533 ds.setSelected(osm); 532 534 } 533 535 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
r32329 r32425 580 580 Main.info("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened."); 581 581 // remove the duplicated layer 582 Main. main.removeLayer(wmsLayer);582 Main.getLayerManager().removeLayer(wmsLayer); 583 583 throw new DuplicateLayerException(); 584 584 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r32329 r32425 458 458 int wmsNewLayerPos = Main.getLayerManager().getLayers().size(); 459 459 for(Layer l : Main.getLayerManager().getLayersOfType(WMSLayer.class)) { 460 int wmsPos = Main. map.mapView.getLayerPos(l);460 int wmsPos = Main.getLayerManager().getLayers().indexOf(l); 461 461 if (wmsPos < wmsNewLayerPos) wmsNewLayerPos = wmsPos; 462 462 } 463 Main. main.addLayer(wmsLayer);463 Main.getLayerManager().addLayer(wmsLayer); 464 464 // Move the layer to its new position 465 465 Main.map.mapView.moveLayer(wmsLayer, wmsNewLayerPos); 466 466 } else 467 Main. main.addLayer(wmsLayer);467 Main.getLayerManager().addLayer(wmsLayer); 468 468 } 469 469 -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
r32211 r32425 142 142 // check if the new way or its nodes is already in OSM layer 143 143 for (Node n : svgDataSet.getNodes()) { 144 Node nearestNewNode = checkNearestNode(n, Main. main.getCurrentDataSet().getNodes());144 Node nearestNewNode = checkNearestNode(n, Main.getLayerManager().getEditDataSet().getNodes()); 145 145 if (nearestNewNode != n) { 146 146 // replace the SVG node by the OSM node -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
r32205 r32425 43 43 // set raster image commune bounding box based on current view (before adjustment) 44 44 JOptionPane.showMessageDialog(Main.parent,tr("This commune is not vectorized.\nPlease use the other menu entry to georeference a \"Plan image\"")); 45 Main. main.removeLayer(wmsLayer);45 Main.getLayerManager().removeLayer(wmsLayer); 46 46 wmsLayer = null; 47 47 return; … … 56 56 else if(wmsLayer.getImages().size()==0) 57 57 // failed to contact WMS of find this commune. Remove layer if empty. 58 Main. main.removeLayer(wmsLayer);58 Main.getLayerManager().removeLayer(wmsLayer); 59 59 } catch (DuplicateLayerException e) { 60 60 // we tried to grab onto a duplicated layer (removed) -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/RasterImageGeoreferencer.java
r32060 r32425 159 159 if (selectedValue == 0) { // "Cancel" 160 160 // remove layer 161 Main. main.removeLayer(wmsLayer);161 Main.getLayerManager().removeLayer(wmsLayer); 162 162 wmsLayer = null; 163 163 Main.map.mapView.removeMouseListener(this); … … 348 348 actionCompleted(); 349 349 if (wmsLayer != null) { 350 Main. main.removeLayer(wmsLayer);350 Main.getLayerManager().removeLayer(wmsLayer); 351 351 wmsLayer = null; 352 352 }
Note:
See TracChangeset
for help on using the changeset viewer.