Skip to content
Snippets Groups Projects
Commit da8894ef authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Stop warning animation if position is before warning period

parent 0c272170
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ import javafx.util.Duration;
public class PadDurationListener implements ChangeListener<Duration> {
private AbstractPadViewController controller;
private final AbstractPadViewController controller;
public PadDurationListener(AbstractPadViewController controller) {
this.controller = controller;
......
......@@ -78,8 +78,8 @@ public class PadPositionListener implements Runnable, IPadPositionListener {
// Label (Restlaufzeit)
controller.updateTimeLabel();
// Warning nur wenn kein Loop und nur wenn Play, da sonst schon anderer Zustand und Warning nicht mehr richtig Reseted
// wird
// Warning nur, wenn kein Loop und nur wenn Play, da sonst schon anderer Zustand und Warning nicht mehr richtig
// zurückgesetzt wird
if (!pad.getPadSettings().isLoop() && pad.getStatus() == PadStatus.PLAY) {
// Warning
Duration warning = pad.getPadSettings().getWarning();
......@@ -90,6 +90,11 @@ public class PadPositionListener implements Runnable, IPadPositionListener {
startWarningThread();
send = true;
}
if (warning.toSeconds() < seconds && send) {
stopWaning();
send = false;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment