mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-25 17:09:09 +00:00
bugfix: on prev <> next
skipping through events while playing would cause false data in clock
This commit is contained in:
@@ -734,14 +734,15 @@ class EventTimer extends Timer {
|
|||||||
this.loadEvent(0);
|
this.loadEvent(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// change playstate
|
||||||
|
this.pause();
|
||||||
|
|
||||||
const gotoEvent =
|
const gotoEvent =
|
||||||
this.selectedEventIndex > 0 ? this.selectedEventIndex - 1 : 0;
|
this.selectedEventIndex > 0 ? this.selectedEventIndex - 1 : 0;
|
||||||
|
|
||||||
if (gotoEvent === this.selectedEventIndex) return;
|
if (gotoEvent === this.selectedEventIndex) return;
|
||||||
this.loadEvent(gotoEvent);
|
this.loadEvent(gotoEvent);
|
||||||
|
|
||||||
// change playstate
|
|
||||||
this.pause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
next() {
|
next() {
|
||||||
@@ -754,6 +755,9 @@ class EventTimer extends Timer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// change playstate
|
||||||
|
this.pause();
|
||||||
|
|
||||||
const gotoEvent =
|
const gotoEvent =
|
||||||
this.selectedEventIndex < this.numEvents - 1
|
this.selectedEventIndex < this.numEvents - 1
|
||||||
? this.selectedEventIndex + 1
|
? this.selectedEventIndex + 1
|
||||||
@@ -761,9 +765,6 @@ class EventTimer extends Timer {
|
|||||||
|
|
||||||
if (gotoEvent === this.selectedEventIndex) return;
|
if (gotoEvent === this.selectedEventIndex) return;
|
||||||
this.loadEvent(gotoEvent);
|
this.loadEvent(gotoEvent);
|
||||||
|
|
||||||
// change playstate
|
|
||||||
this.pause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unload() {
|
unload() {
|
||||||
|
|||||||
Reference in New Issue
Block a user