- Timestamp:
- 2009-06-06T13:26:19+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r1557 r1634 56 56 */ 57 57 public class SelectAction extends MapMode implements SelectionEnded { 58 58 public static boolean needMouseMove = false; 59 59 enum Mode { move, rotate, select } 60 60 private Mode mode = null; … … 156 156 if ((mode == Mode.move) && (System.currentTimeMillis() - mouseDownTime < initialMoveDelay)) return; 157 157 158 if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == 0) 159 return; 160 161 if (mode == Mode.move) { 158 if(mode != Mode.rotate) // button is pressed in rotate mode 159 if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == 0) 160 return; 161 162 if (mode == Mode.move) 162 163 setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); 163 }164 164 165 165 if (mousePos == null) { … … 246 246 247 247 didMove = true; 248 } 249 250 /** 251 * Mac OSX simulates with ctrl + mouse 1 the second mouse button hence no dragging events get fired. 252 * 253 */ 254 @Override public void mouseMoved(MouseEvent e) { 255 if (needMouseMove && mode == Mode.rotate) 256 mouseDragged(e); 248 257 } 249 258 -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r1415 r1634 2 2 package org.openstreetmap.josm.tools; 3 3 4 import org.openstreetmap.josm.tools.Shortcut; 4 import java.awt.event.KeyEvent; 5 import java.io.IOException; 6 import java.lang.reflect.InvocationHandler; 7 import java.lang.reflect.Method; 8 import java.lang.reflect.Proxy; 9 10 import javax.swing.UIManager; 11 5 12 import org.openstreetmap.josm.Main; 6 import org.openstreetmap.josm.tools.PlatformHookUnixoid; 7 8 import java.awt.event.KeyEvent; 9 import java.lang.reflect.*; 10 import java.io.IOException; 11 import javax.swing.UIManager; 13 import org.openstreetmap.josm.actions.mapmode.SelectAction; 12 14 13 15 /** … … 40 42 System.out.println("Failed to register with OSX: " + ex); 41 43 } 44 45 // Ctrl + mouse 1 is suppressing mouseDragged events 46 SelectAction.needMouseMove = true; 42 47 } 43 48 public Object invoke (Object proxy, Method method, Object[] args) throws Throwable {
Note:
See TracChangeset
for help on using the changeset viewer.