in Timer.resume() also resume if timer was in state "Stopped"

This commit is contained in:
Axel Uhl committed 2012-02-09 23:22:05 +01:00
1 parent 317354886d
commit 3e52a86463
1 file changed
+4 -5
@@ -185,12 +185,11 @@ public class Timer {
* and registered {@link PlayStateListener}s will be notified.
*/
public void resume() {
if (playState == PlayStates.Paused) {
if (playState == PlayStates.Paused || playState == PlayStates.Stopped) {
playState = PlayStates.Playing;
if(playMode == PlayModes.Live)
if(playMode == PlayModes.Live) {
setTime(System.currentTimeMillis()-livePlayDelayInMs);
}
startAutoAdvance();
for (PlayStateListener playStateListener : playStateListeners) {
playStateListener.playStateChanged(playState, playMode);
@@ -199,7 +198,7 @@ public class Timer {
}
private void startAutoAdvance() {
RepeatingCommand command = new RepeatingCommand( ) {
RepeatingCommand command = new RepeatingCommand() {
@Override
public boolean execute() {
if (time != null) {