Changeset 32329 in osm for applications/editors/josm/plugins/DirectUpload
- Timestamp:
- 2016-06-19T16:08:56+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/DirectUpload
- Files:
-
- 2 edited
-
build.xml (modified) (1 diff)
-
src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectUpload/build.xml
r31949 r32329 5 5 <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 9314"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java
r31871 r32329 11 11 import org.openstreetmap.josm.gui.layer.GpxLayer; 12 12 import org.openstreetmap.josm.gui.layer.Layer; 13 import org.openstreetmap.josm.gui.layer.MainLayerManager; 13 14 import org.openstreetmap.josm.io.OsmConnection; 14 15 import org.openstreetmap.josm.io.OsmTransferException; … … 49 50 GpxData autoSelectTrace() { 50 51 if (Main.map != null && Main.map.mapView != null) { 51 Ma pView mv= Main.map.mapView;52 MainLayerManager lm = Main.getLayerManager(); 52 53 // List<Layer> allLayers = new ArrayList<Layer>(mv.getAllLayersAsList()); // modifiable 53 54 List<Layer> selectedLayers = LayerListDialog.getInstance().getModel().getSelectedLayers(); 54 List<GpxLayer> gpxLayersRemaining = mv.getLayersOfType(GpxLayer.class);55 List<GpxLayer> gpxLayersRemaining = lm.getLayersOfType(GpxLayer.class); 55 56 gpxLayersRemaining.removeAll(selectedLayers); 56 57 GpxLayer traceLayer = null; … … 68 69 } 69 70 // active layer 70 else if ( mv.getActiveLayer() instanceof GpxLayer) {71 traceLayer = (GpxLayer) mv.getActiveLayer();71 else if (lm.getActiveLayer() instanceof GpxLayer) { 72 traceLayer = (GpxLayer) lm.getActiveLayer(); 72 73 } 73 74 } 74 75 75 76 if (traceLayer != null) { 76 GpxData data = traceLayer.data; 77 return data; 77 return traceLayer.data; 78 78 } 79 79 }
Note:
See TracChangeset
for help on using the changeset viewer.
