Changeset 9260 in josm
- Timestamp:
- 2016-01-02T15:10:59+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r9258 r9260 138 138 } 139 139 140 private final transient Shortcut[] visibilityToggleShortcuts = new Shortcut[]{ 141 Shortcut.registerShortcut("subwindow:layers:toggleLayer1", tr("Toggle visibility of layer: {0}", 1), KeyEvent.VK_1, Shortcut.ALT), 142 Shortcut.registerShortcut("subwindow:layers:toggleLayer2", tr("Toggle visibility of layer: {0}", 2), KeyEvent.VK_2, Shortcut.ALT), 143 Shortcut.registerShortcut("subwindow:layers:toggleLayer3", tr("Toggle visibility of layer: {0}", 3), KeyEvent.VK_3, Shortcut.ALT), 144 Shortcut.registerShortcut("subwindow:layers:toggleLayer4", tr("Toggle visibility of layer: {0}", 4), KeyEvent.VK_4, Shortcut.ALT), 145 Shortcut.registerShortcut("subwindow:layers:toggleLayer5", tr("Toggle visibility of layer: {0}", 5), KeyEvent.VK_5, Shortcut.ALT), 146 Shortcut.registerShortcut("subwindow:layers:toggleLayer6", tr("Toggle visibility of layer: {0}", 6), KeyEvent.VK_6, Shortcut.ALT), 147 Shortcut.registerShortcut("subwindow:layers:toggleLayer7", tr("Toggle visibility of layer: {0}", 7), KeyEvent.VK_7, Shortcut.ALT), 148 Shortcut.registerShortcut("subwindow:layers:toggleLayer8", tr("Toggle visibility of layer: {0}", 8), KeyEvent.VK_8, Shortcut.ALT), 149 Shortcut.registerShortcut("subwindow:layers:toggleLayer9", tr("Toggle visibility of layer: {0}", 9), KeyEvent.VK_9, Shortcut.ALT), 150 Shortcut.registerShortcut("subwindow:layers:toggleLayer10", tr("Toggle visibility of layer: {0}", 10), KeyEvent.VK_0, Shortcut.ALT), 151 }; 140 private final transient Shortcut[] visibilityToggleShortcuts = new Shortcut[10]; 152 141 private final ToggleLayerIndexVisibility[] visibilityToggleActions = new ToggleLayerIndexVisibility[10]; 153 142 … … 158 147 private void createVisibilityToggleShortcuts() { 159 148 for (int i = 0; i < 10; i++) { 149 final int i1 = i + 1; 150 visibilityToggleShortcuts[i] = Shortcut.registerShortcut("subwindow:layers:toggleLayer" + i1, 151 tr("Toggle visibility of layer: {0}", i1), KeyEvent.VK_0 + (i1 % 10), Shortcut.ALT); 160 152 visibilityToggleActions[i] = new ToggleLayerIndexVisibility(i); 161 153 Main.registerActionShortcut(visibilityToggleActions[i], visibilityToggleShortcuts[i]); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r9259 r9260 709 709 final String actionShortcutShiftKey = "properties:recent:shift:" + count; 710 710 final Shortcut sc = count > 10 ? null : Shortcut.registerShortcut( 711 actionShortcutKey, tr("Choose recent tag {0}", count), KeyEvent.VK_0 + count, Shortcut.CTRL);711 actionShortcutKey, tr("Choose recent tag {0}", count), KeyEvent.VK_0 + (count % 10), Shortcut.CTRL); 712 712 final JosmAction action = new JosmAction(actionShortcutKey, null, tr("Use this tag again"), sc, false) { 713 713 @Override … … 721 721 }; 722 722 final Shortcut scShift = count > 10 ? null : Shortcut.registerShortcut( 723 actionShortcutShiftKey, tr("Apply recent tag {0}", count), KeyEvent.VK_0 + count, Shortcut.CTRL_SHIFT);723 actionShortcutShiftKey, tr("Apply recent tag {0}", count), KeyEvent.VK_0 + (count % 10), Shortcut.CTRL_SHIFT); 724 724 final JosmAction actionShift = new JosmAction(actionShortcutShiftKey, null, tr("Use this tag again"), scShift, false) { 725 725 @Override
Note:
See TracChangeset
for help on using the changeset viewer.