Changeset 1379 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2009-02-08T11:34:23+01:00 (17 years ago)
- File:
-
- 1 edited
-
trunk/src/org/openstreetmap/josm/gui/MapView.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r1265 r1379 15 15 import java.awt.image.BufferedImage; 16 16 import java.util.ArrayList; 17 import java.util.Enumeration; 17 18 import java.util.Collection; 18 19 import java.util.Collections; 19 20 import java.util.LinkedList; 20 21 22 import javax.swing.AbstractButton; 21 23 import javax.swing.JComponent; 22 24 import javax.swing.JOptionPane; … … 25 27 import org.openstreetmap.josm.actions.AutoScaleAction; 26 28 import org.openstreetmap.josm.actions.JosmAction; 29 import org.openstreetmap.josm.actions.mapmode.MapMode; 27 30 import org.openstreetmap.josm.actions.MoveAction; 28 31 import org.openstreetmap.josm.data.Bounds; … … 357 360 l.activeLayerChange(old, layer); 358 361 } 362 363 /* This only makes the buttons look disabled. Disabling the actions as well requires 364 * the user to re-select the tool after i.e. moving a layer. While testing I found 365 * that I switch layers and actions at the same time and it was annoying to mind the 366 * order. This way it works as visual clue for new users */ 367 for (Enumeration e = Main.map.toolGroup.getElements() ; e.hasMoreElements() ;) { 368 AbstractButton x=(AbstractButton)e.nextElement(); 369 x.setEnabled(((MapMode)x.getAction()).layerIsSupported(layer)); 370 } 359 371 repaint(); 360 372 }
Note:
See TracChangeset
for help on using the changeset viewer.
