Ignore:
Timestamp:
2009-07-26T12:08:12+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3091: zoom to selection on gpx load only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r1847 r1854  
    125125    @Override
    126126    protected void updateEnabledState() {
    127         setEnabled(Main.map != null);
     127        if ("selection".equals(mode)) {
     128            setEnabled(getCurrentDataSet() != null && ! getCurrentDataSet().getSelected().isEmpty());
     129        } else {
     130            setEnabled(
     131                    Main.map != null
     132                    && Main.map.mapView != null
     133                    && Main.map.mapView.getAllLayers().size() > 0
     134            );
     135        }
    128136    }
    129 
    130137}
Note: See TracChangeset for help on using the changeset viewer.