Changeset 6052 in josm
- Timestamp:
- 2013-07-06T17:12:26+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r6020 r6052 6 6 import java.awt.AlphaComposite; 7 7 import java.awt.Color; 8 9 8 import java.awt.Dimension; 10 9 import java.awt.Graphics; … … 57 56 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 58 57 import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker; 58 import org.openstreetmap.josm.gui.util.GuiHelper; 59 59 import org.openstreetmap.josm.tools.AudioPlayer; 60 60 import org.openstreetmap.josm.tools.BugReportExceptionHandler; … … 818 818 * that I switch layers and actions at the same time and it was annoying to mind the 819 819 * order. This way it works as visual clue for new users */ 820 for ( AbstractButton b: Main.map.allMapModeButtons) {820 for (final AbstractButton b: Main.map.allMapModeButtons) { 821 821 MapMode mode = (MapMode)b.getAction(); 822 822 if (mode.layerIsSupported(layer)) { 823 823 Main.registerActionShortcut(mode, mode.getShortcut()); //fix #6876 824 b.setEnabled(true); 824 GuiHelper.runInEDTAndWait(new Runnable() { 825 @Override public void run() { 826 b.setEnabled(true); 827 } 828 }); 825 829 } else { 826 830 Main.unregisterShortcut(mode.getShortcut()); 827 b.setEnabled(false); 831 GuiHelper.runInEDTAndWait(new Runnable() { 832 @Override public void run() { 833 b.setEnabled(false); 834 } 835 }); 828 836 } 829 837 }
Note:
See TracChangeset
for help on using the changeset viewer.