Ignore:
Timestamp:
2014-04-27T13:58:10+02:00 (10 years ago)
Author:
bastiK
Message:

see #9897 - Move map no longer works on OSX (do not drag a rectangle when ctrl+left-click moving the map in download dialog)

File:
1 edited

Legend:

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

    r6710 r7011  
    1919import javax.swing.JPanel;
    2020import javax.swing.KeyStroke;
     21import org.openstreetmap.josm.Main;
    2122
    2223/**
     
    4445    /** The speed increase per timer interval when a cursor button is clicked */
    4546    private static final double ACCELERATION = 0.10;
     47   
     48    private static final int MAC_MOUSE_BUTTON3_MASK = MouseEvent.CTRL_DOWN_MASK | MouseEvent.BUTTON1_DOWN_MASK;
    4649
    4750    // start and end point of selection rectangle
     
    118121    @Override
    119122    public void mousePressed(MouseEvent e) {
    120         if (e.getButton() == MouseEvent.BUTTON1) {
     123        if (e.getButton() == MouseEvent.BUTTON1 && !(Main.isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK)) {
    121124            iStartSelectionPoint = e.getPoint();
    122125            iEndSelectionPoint = e.getPoint();
     
    126129    @Override
    127130    public void mouseDragged(MouseEvent e) {
    128         if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) {
     131        if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK &&
     132                !(Main.isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK)) {
    129133            if (iStartSelectionPoint != null) {
    130134                iEndSelectionPoint = e.getPoint();
Note: See TracChangeset for help on using the changeset viewer.