Changeset 6989 in josm for trunk/src/org
- Timestamp:
- 2014-04-18T15:51:22+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapMover.java
r6957 r6989 124 124 public void mouseDragged(MouseEvent e) { 125 125 int offMask = MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON2_DOWN_MASK; 126 if ((e.getModifiersEx() & (MouseEvent.BUTTON3_DOWN_MASK | offMask)) == MouseEvent.BUTTON3_DOWN_MASK) { 126 int macMouseMask = MouseEvent.CTRL_DOWN_MASK | MouseEvent.BUTTON1_DOWN_MASK; 127 if ((e.getModifiersEx() & (MouseEvent.BUTTON3_DOWN_MASK | offMask)) == MouseEvent.BUTTON3_DOWN_MASK || 128 Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask) { 127 129 if (mousePosMove == null) 128 130 startMovement(e); … … 144 146 int offMask = MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON2_DOWN_MASK; 145 147 int macMouseMask = MouseEvent.CTRL_DOWN_MASK | MouseEvent.BUTTON1_DOWN_MASK; 146 if (e.getButton() == MouseEvent.BUTTON3 && (e.getModifiersEx() & offMask) == 0) { 148 if (e.getButton() == MouseEvent.BUTTON3 && (e.getModifiersEx() & offMask) == 0 || 149 Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask) { 147 150 startMovement(e); 148 } else if (Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask) {149 startMovement(e);150 151 } 151 152 } … … 156 157 @Override 157 158 public void mouseReleased(MouseEvent e) { 158 if (e.getButton() == MouseEvent.BUTTON3) { 159 endMovement(); 160 } else if (Main.isPlatformOsx() && e.getButton() == MouseEvent.BUTTON1) { 159 if (e.getButton() == MouseEvent.BUTTON3 || Main.isPlatformOsx() && e.getButton() == MouseEvent.BUTTON1) { 161 160 endMovement(); 162 161 }
Note:
See TracChangeset
for help on using the changeset viewer.