mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 03:13:49 +00:00
in Timer.resume() also resume if timer was in state "Stopped"
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user