Ignore:
Timestamp:
2014-10-07T02:37:12+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #10592 - fix other shortcuts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapMover.java

    r7590 r7606  
    116116            contentPane.getActionMap().put("MapMover.Zoomer.down", new ZoomerAction("down"));
    117117
    118             contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    119                 Shortcut.registerShortcut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, Shortcut.CTRL).getKeyStroke(),
    120                 "MapMover.Zoomer.in");
    121             contentPane.getActionMap().put("MapMover.Zoomer.in", new ZoomerAction(","));
    122 
    123             contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    124                 Shortcut.registerShortcut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, Shortcut.CTRL).getKeyStroke(),
    125                 "MapMover.Zoomer.out");
    126             contentPane.getActionMap().put("MapMover.Zoomer.out", new ZoomerAction("."));
     118            // see #10592 - Disable these alternate shortcuts on OS X because of conflict with system shortcut
     119            if (!Main.isPlatformOsx()) {
     120                contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
     121                    Shortcut.registerShortcut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, Shortcut.CTRL).getKeyStroke(),
     122                    "MapMover.Zoomer.in");
     123                contentPane.getActionMap().put("MapMover.Zoomer.in", new ZoomerAction(","));
     124
     125                contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
     126                    Shortcut.registerShortcut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, Shortcut.CTRL).getKeyStroke(),
     127                    "MapMover.Zoomer.out");
     128                contentPane.getActionMap().put("MapMover.Zoomer.out", new ZoomerAction("."));
     129            }
    127130        }
    128131    }
Note: See TracChangeset for help on using the changeset viewer.