diff --git a/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java b/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java
index 539a7dc..52d7b67 100644
|
a
|
b
|
import java.awt.event.KeyEvent;
|
| 8 | 8 | import java.net.URL; |
| 9 | 9 | |
| 10 | 10 | import org.openstreetmap.josm.actions.JosmAction; |
| | 11 | import org.openstreetmap.josm.gui.layer.markerlayer.AudioMarker; |
| 11 | 12 | import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; |
| 12 | 13 | import org.openstreetmap.josm.tools.AudioPlayer; |
| 13 | 14 | import org.openstreetmap.josm.tools.Shortcut; |
| … |
… |
public class AudioPlayPauseAction extends JosmAction {
|
| 30 | 31 | else |
| 31 | 32 | AudioPlayer.pause(); |
| 32 | 33 | } else { |
| 33 | | // find first audio marker to play |
| 34 | | MarkerLayer.playAudio(); |
| | 34 | // play the last-played marker again, if there is one |
| | 35 | AudioMarker lastPlayed = AudioMarker.recentlyPlayedMarker(); |
| | 36 | if (lastPlayed != null) { |
| | 37 | lastPlayed.play(); |
| | 38 | } else { |
| | 39 | // If no marker was played recently, play the first one |
| | 40 | MarkerLayer.playAudio(); |
| | 41 | } |
| 35 | 42 | } |
| 36 | 43 | } catch (Exception ex) { |
| 37 | 44 | AudioPlayer.audioMalfunction(ex); |