Changeset 19082 in osm for applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap
- Timestamp:
- 2009-12-13T10:00:16+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java
r13497 r19082 11 11 import java.awt.event.ActionEvent; 12 12 import java.awt.event.KeyEvent; 13 13 14 import org.openstreetmap.josm.Main; 14 15 import org.openstreetmap.josm.actions.JosmAction; 15 import org.openstreetmap.josm.gui.MapFrame; 16 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 17 import org.openstreetmap.josm.gui.layer.GpxLayer; 16 18 import org.openstreetmap.josm.gui.layer.Layer; 17 19 import org.openstreetmap.josm.plugins.Plugin; … … 29 31 } 30 32 31 class UploadAction extends JosmAction { 32 33 class UploadAction extends JosmAction{ 33 34 public UploadAction(){ 34 35 super(tr("Upload Traces"), "UploadAction", tr("Uploads traces to openstreetmap.org"), … … 40 41 go.setVisible(true); 41 42 } 43 44 @Override 45 protected void updateEnabledState() { 46 if(Main.map == null 47 || Main.map.mapView == null 48 || Main.map.mapView.getActiveLayer() == null 49 || !(Main.map.mapView.getActiveLayer() instanceof GpxLayer)) { 50 setEnabled(false); 51 } else { 52 setEnabled(true); 53 } 54 55 } 42 56 } 43 57 }
Note:
See TracChangeset
for help on using the changeset viewer.