Changeset 1854 in josm
- Timestamp:
- 2009-07-26T12:08:12+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r1847 r1854 125 125 @Override 126 126 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 } 128 136 } 129 130 137 } -
trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java
r1820 r1854 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.gui.layer.Layer; 10 11 import org.openstreetmap.josm.tools.Shortcut; 11 12 … … 15 16 super(tr("Zoom In"), "dialogs/zoomin", tr("Zoom In"), 16 17 Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom In")), KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), true); 17 setEnabled(true);18 18 } 19 19 … … 22 22 Main.map.mapView.zoomToFactor(0.9); 23 23 } 24 25 @Override 26 protected void updateEnabledState() { 27 setEnabled( 28 Main.map != null 29 && Main.map.mapView != null 30 && Main.map.mapView.getAllLayers().size() > 0 31 ); 32 } 33 24 34 } -
trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java
r1722 r1854 14 14 public ZoomOutAction() { 15 15 super(tr("Zoom Out"), "dialogs/zoomout", tr("Zoom Out"), 16 Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom Out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true); 17 setEnabled(true); 16 Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom Out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true); 18 17 } 19 18 … … 22 21 Main.map.mapView.zoomToFactor(1/0.9); 23 22 } 23 24 @Override 25 protected void updateEnabledState() { 26 setEnabled( 27 Main.map != null 28 && Main.map.mapView != null 29 && Main.map.mapView.getAllLayers().size() > 0 30 ); 31 } 24 32 } -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r1825 r1854 31 31 import org.openstreetmap.josm.actions.mapmode.MapMode; 32 32 import org.openstreetmap.josm.data.Bounds; 33 import org.openstreetmap.josm.data.ProjectionBounds;34 33 import org.openstreetmap.josm.data.SelectionChangedListener; 34 import org.openstreetmap.josm.data.coor.LatLon; 35 35 import org.openstreetmap.josm.data.osm.DataSet; 36 36 import org.openstreetmap.josm.data.osm.DataSource; 37 37 import org.openstreetmap.josm.data.osm.OsmPrimitive; 38 38 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 39 import org.openstreetmap.josm.data.coor.LatLon;40 39 import org.openstreetmap.josm.gui.layer.Layer; 41 40 import org.openstreetmap.josm.gui.layer.MapViewPaintable;
Note:
See TracChangeset
for help on using the changeset viewer.