Changeset 20880 in osm for applications/editors/josm/plugins/DirectUpload
- Timestamp:
- 2010-04-11T11:02:28+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java
r19432 r20880 11 11 import java.awt.event.ActionEvent; 12 12 import java.awt.event.KeyEvent; 13 import java.util.List; 13 14 14 15 import org.openstreetmap.josm.Main; … … 44 45 @Override 45 46 protected void updateEnabledState() { 46 if(Main.map == null 47 // enable button if there is "one active GpxLayer" or "exactly one GpxLayer in the list of all layers available" 48 if(Main.map == null 47 49 || Main.map.mapView == null 48 50 || Main.map.mapView.getActiveLayer() == null … … 53 55 } 54 56 55 } 57 if(Main.map != null && Main.map.mapView.getNumLayers() > 1) { 58 List<GpxLayer> list = Main.map.mapView.getLayersOfType(GpxLayer.class); 59 if (list.size() == 1) 60 setEnabled(true); 61 } 62 63 } 56 64 } 57 65 }
Note:
See TracChangeset
for help on using the changeset viewer.