Changeset 7094 in josm


Ignore:
Timestamp:
2014-05-10T13:15:11+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #9977 - Jumping to play head marker when playing next audio (patch by MatthiasN)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java

    r6883 r7094  
    4444    private boolean wasPlaying = false;
    4545    private int dropTolerance; /* pixels */
     46    private boolean jumpToMarker = false;
    4647
    4748    /**
     
    234235
    235236        /* Actually do the synchronization */
    236         if(ca == null)
    237         {
     237        if(ca == null) {
    238238            JOptionPane.showMessageDialog(
    239239                    Main.parent,
     
    280280    public void animate() {
    281281        if (! enabled) return;
     282        jumpToMarker = true;
    282283        if (timer == null) {
    283284            animationInterval = Main.pref.getDouble("marker.audioanimationinterval", 1.0); //milliseconds
     
    343344                            (audioTime - w1.time)/(w2.time - w1.time)));
    344345        time = audioTime;
     346        if (jumpToMarker) {
     347            jumpToMarker = false;
     348            Main.map.mapView.zoomTo(w1.getEastNorth());
     349        }
    345350        Main.map.mapView.repaint();
    346351    }
Note: See TracChangeset for help on using the changeset viewer.