Ticket #23863: 23863_center_view_at_mouse_ctrl_home.patch
| File 23863_center_view_at_mouse_ctrl_home.patch, 1.4 KB (added by , 5 days ago) |
|---|
-
src/org/openstreetmap/josm/gui/MapMover.java
101 101 case "down": 102 102 nc.zoomTo(new EastNorth(center.east(), newcenter.north())); 103 103 break; 104 case "center": 105 Optional.ofNullable(nc.getMousePosition()).ifPresent(p -> nc.zoomTo(nc.getEastNorth(p.x, p.y))); 106 break; 104 107 default: // Do nothing 105 108 } 106 109 } … … 143 146 Shortcut.registerShortcut("system:movefocusup", tr("Map: {0}", tr("Move up")), KeyEvent.VK_UP, Shortcut.CTRL)); 144 147 registerActionShortcut(new ZoomerAction("down"), 145 148 Shortcut.registerShortcut("system:movefocusdown", tr("Map: {0}", tr("Move down")), KeyEvent.VK_DOWN, Shortcut.CTRL)); 149 registerActionShortcut(new ZoomerAction("center"), 150 Shortcut.registerShortcut("view:centeratmouse", tr("Map: {0}", tr("Center view at mouse position")), 151 KeyEvent.VK_HOME, Shortcut.CTRL)); 146 152 147 153 // see #10592 - Disable these alternate shortcuts on OS X because of conflict with system shortcut 148 154 if (!PlatformManager.isPlatformOsx()) {
