Changeset 7011 in josm for trunk/src


Ignore:
Timestamp:
2014-04-27T13:58:10+02:00 (6 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)

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

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

    r7005 r7011  
    4747 *
    4848 * If multiple messages are sent in a short period of time, they are put in
    49  * a queue and displayed on after the other.
     49 * a queue and displayed one after the other.
    5050 *
    5151 * The user can stop the timer (freeze the message) by moving the mouse cursor
     
    5656
    5757    private Timer hideTimer; // started when message is shown, responsible for hiding the message
    58     private Timer pauseTimer; // makes sure the is a small pause between to consecutive messages
     58    private Timer pauseTimer; // makes sure, there is a small pause between two consecutive messages
    5959    private Timer unfreezeDelayTimer; // tiny delay before resuming the timer when mouse cursor
    6060                                      // is moved off the panel
  • 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.