- Timestamp:
- 2016-06-20T02:47:43+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DeleteLayerAction.java
r10413 r10436 37 37 return; 38 38 } 39 Main. main.removeLayer(activeLayer);39 Main.getLayerManager().removeLayer(activeLayer); 40 40 } 41 41 -
trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
r10318 r10436 234 234 private static void addWMSLayer(String title, String url) { 235 235 WMSLayer layer = new WMSLayer(new ImageryInfo(title, url)); 236 Main. main.addLayer(layer);236 Main.getLayerManager().addLayer(layer); 237 237 } 238 238 -
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r10413 r10436 57 57 @Override 58 58 public void run() { 59 Main. main.removeLayer(sourceLayer);59 Main.getLayerManager().removeLayer(sourceLayer); 60 60 } 61 61 }); -
trunk/src/org/openstreetmap/josm/actions/NewAction.java
r6509 r10436 30 30 @Override 31 31 public void actionPerformed(ActionEvent e) { 32 Main. main.addLayer(new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null));32 Main.getLayerManager().addLayer(new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null)); 33 33 } 34 34 } -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java
r10318 r10436 117 117 noteLayers.get(0).getNoteData().addNotes(notesData); 118 118 } else { 119 Main. main.addLayer(new NoteLayer(notesData, tr("Notes")));119 Main.getLayerManager().addLayer(new NoteLayer(notesData, tr("Notes"))); 120 120 } 121 121 } -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r10413 r10436 261 261 final OsmDataLayer layer = createNewLayer(newLayerName); 262 262 if (Main.main != null) 263 Main. main.addLayer(layer);263 Main.getLayerManager().addLayer(layer); 264 264 return layer; 265 265 } -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java
r10413 r10436 72 72 if (newLayer) { 73 73 Layer l = new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null); 74 Main. main.addLayer(l);74 Main.getLayerManager().addLayer(l); 75 75 Main.getLayerManager().setActiveLayer(l); 76 76 } -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r10297 r10436 222 222 if (errorLayer == null) { 223 223 errorLayer = new ValidatorLayer(); 224 Main. main.addLayer(errorLayer);224 Main.getLayerManager().addLayer(errorLayer); 225 225 } 226 226 } … … 367 367 if (e.getSource().getLayersOfType(OsmDataLayer.class).isEmpty()) { 368 368 if (errorLayer != null) { 369 Main. main.removeLayer(errorLayer);369 Main.getLayerManager().removeLayer(errorLayer); 370 370 } 371 371 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DeleteLayerAction.java
r10428 r10436 46 46 return; 47 47 for (Layer l: selectedLayers) { 48 Main. main.removeLayer(l);48 Main.getLayerManager().removeLayer(l); 49 49 } 50 50 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DuplicateAction.java
r10364 r10436 70 70 i++; 71 71 } 72 Main. main.addLayer(new OsmDataLayer(new DataSet(oldLayer.data), newName, null));72 Main.getLayerManager().addLayer(new OsmDataLayer(new DataSet(oldLayer.data), newName, null)); 73 73 } 74 74 } -
trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
r10413 r10436 131 131 OsmDataLayer layer = Main.getLayerManager().getEditLayer(); 132 132 if (layer == null || this.newLayer) 133 Main. main.addLayer(tmpLayer);133 Main.getLayerManager().addLayer(tmpLayer); 134 134 else 135 135 layer.mergeFrom(tmpLayer); -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r10395 r10436 821 821 gpxLayer.setAssociatedFile(new File(getAssociatedFile().getParentFile(), filename)); 822 822 } 823 Main. main.addLayer(gpxLayer);823 Main.getLayerManager().addLayer(gpxLayer); 824 824 if (Main.pref.getBoolean("marker.makeautomarkers", true) && !gpxData.waypoints.isEmpty()) { 825 Main. main.addLayer(new MarkerLayer(gpxData, tr("Converted from: {0}", getName()), null, gpxLayer));826 } 827 Main. main.removeLayer(OsmDataLayer.this);825 Main.getLayerManager().addLayer(new MarkerLayer(gpxData, tr("Converted from: {0}", getName()), null, gpxLayer)); 826 } 827 Main.getLayerManager().removeLayer(OsmDataLayer.this); 828 828 } 829 829 } -
trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java
r10386 r10436 164 164 public void layerRemoving(LayerRemoveEvent e) { 165 165 if (e.getRemovedLayer() instanceof OsmDataLayer && Main.isDisplayingMapView() && !Main.main.hasEditLayer()) { 166 Main. main.removeLayer(this);166 Main.getLayerManager().removeLayer(this); 167 167 } else if (e.getRemovedLayer() == this) { 168 168 Main.getLayerManager().removeLayerChangeListener(this); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r10386 r10436 283 283 } 284 284 if (layer != null) { 285 Main. main.addLayer(layer);285 Main.getLayerManager().addLayer(layer); 286 286 287 287 if (!canceled && layer.data != null && !layer.data.isEmpty()) { -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
r9215 r10436 135 135 } 136 136 layer.setUploadDiscouraged(true); 137 Main. main.addLayer(layer);138 Main. main.removeLayer(this.layer);137 Main.getLayerManager().addLayer(layer); 138 Main.getLayerManager().removeLayer(this.layer); 139 139 } 140 140 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
r9243 r10436 115 115 importAudio(file, ml, firstStartTime, m); 116 116 } 117 Main. main.addLayer(ml);117 Main.getLayerManager().addLayer(ml); 118 118 Main.map.repaint(); 119 119 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java
r8308 r10436 41 41 MarkerLayer ml = new MarkerLayer(namedTrackPoints, tr("Named Trackpoints from {0}", layer.getName()), layer.getAssociatedFile(), layer); 42 42 if (!ml.data.isEmpty()) { 43 Main. main.addLayer(ml);43 Main.getLayerManager().addLayer(ml); 44 44 } 45 45 } -
trunk/src/org/openstreetmap/josm/io/GpxImporter.java
r9477 r10436 121 121 public void run() { 122 122 if (data.markerLayer != null) { 123 Main. main.addLayer(data.markerLayer);123 Main.getLayerManager().addLayer(data.markerLayer); 124 124 } 125 125 if (data.gpxLayer != null) { 126 Main. main.addLayer(data.gpxLayer);126 Main.getLayerManager().addLayer(data.gpxLayer); 127 127 } 128 128 data.postLayerTask.run(); -
trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
r10305 r10436 53 53 @Override 54 54 public void run() { 55 Main. main.addLayer(gpxLayer);55 Main.getLayerManager().addLayer(gpxLayer); 56 56 if (Main.pref.getBoolean("marker.makeautomarkers", true)) { 57 57 MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), fileFinal, gpxLayer); 58 58 if (!ml.data.isEmpty()) { 59 Main. main.addLayer(ml);59 Main.getLayerManager().addLayer(ml); 60 60 } 61 61 } -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r10378 r10436 256 256 if (((ImageryLayer) l).getInfo().isBlacklisted()) { 257 257 Main.info(tr("Removed layer {0} because it is not allowed by the configured API.", l.getName())); 258 Main. main.removeLayer(l);258 Main.getLayerManager().removeLayer(l); 259 259 } 260 260 } -
trunk/src/org/openstreetmap/josm/io/OsmChangeImporter.java
r10378 r10436 63 63 JOptionPane.INFORMATION_MESSAGE); 64 64 } 65 Main. main.addLayer(layer);65 Main.getLayerManager().addLayer(layer); 66 66 layer.onPostLoadFromFile(); 67 67 } -
trunk/src/org/openstreetmap/josm/io/OsmImporter.java
r10371 r10436 96 96 public void run() { 97 97 OsmDataLayer layer = data.getLayer(); 98 Main. main.addLayer(layer);98 Main.getLayerManager().addLayer(layer); 99 99 data.getPostLayerTask().run(); 100 100 data.getLayer().onPostLoadFromFile(); -
trunk/src/org/openstreetmap/josm/io/WMSLayerImporter.java
r8530 r10436 88 88 @Override 89 89 public void run() { 90 Main. main.addLayer(layer);90 Main.getLayerManager().addLayer(layer); 91 91 if (zoomTo != null) { 92 92 Main.map.mapView.zoomTo(zoomTo); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
r10364 r10436 106 106 public void run() { 107 107 try { 108 Main. main.addLayer(ImageryLayer.create(imgInfo));108 Main.getLayerManager().addLayer(ImageryLayer.create(imgInfo)); 109 109 } catch (IllegalArgumentException e) { 110 110 Main.error(e, false);
Note:
See TracChangeset
for help on using the changeset viewer.