Changeset 6989 in josm


Ignore:
Timestamp:
2014-04-18T15:51:22+02:00 (10 years ago)
Author:
bastiK
Message:

see #josm9897 - Move map no longer works on OSX

File:
1 edited

Legend:

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

    r6957 r6989  
    124124    public void mouseDragged(MouseEvent e) {
    125125        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) {
    127129            if (mousePosMove == null)
    128130                startMovement(e);
     
    144146        int offMask = MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON2_DOWN_MASK;
    145147        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) {
    147150            startMovement(e);
    148         } else if (Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask) {
    149             startMovement(e);
    150151        }
    151152    }
     
    156157    @Override
    157158    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) {
    161160            endMovement();
    162161        }
Note: See TracChangeset for help on using the changeset viewer.