commit 25/07/2025
This commit is contained in:
@@ -24,7 +24,6 @@ import org.tinylog.Logger;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static Config.SomeCodes.*;
|
||||
@@ -84,8 +83,16 @@ public class AutoCloseAlert {
|
||||
* Close the current alert if it is shown
|
||||
*/
|
||||
public static void close(){
|
||||
Optional.ofNullable(currentAlertStage).ifPresent(Stage::close);
|
||||
currentAlertStage = null;
|
||||
if (currentAlertStage!=null){
|
||||
try {
|
||||
closeStage(currentAlertStage);
|
||||
} catch (InterruptedException e) {
|
||||
Logger.error("Error closing alert stage: " + e.getMessage());
|
||||
}
|
||||
currentAlertStage = null;
|
||||
}
|
||||
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
@@ -188,7 +195,12 @@ public class AutoCloseAlert {
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(0), event -> alertStage.show()));
|
||||
|
||||
timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(seconds* (pictures.length)), event -> {
|
||||
alertStage.close();
|
||||
try {
|
||||
closeStage(alertStage);
|
||||
} catch (InterruptedException e) {
|
||||
Logger.error("Error closing alert stage: " + e.getMessage());
|
||||
}
|
||||
//alertStage.close();
|
||||
if (currentAlertStage == alertStage) {
|
||||
currentAlertStage = null;
|
||||
}
|
||||
@@ -329,7 +341,12 @@ public class AutoCloseAlert {
|
||||
if (seconds>0){
|
||||
PauseTransition delay = new PauseTransition(Duration.seconds(seconds));
|
||||
delay.setOnFinished(e -> {
|
||||
alertStage.close();
|
||||
try {
|
||||
closeStage(alertStage);
|
||||
} catch (InterruptedException err) {
|
||||
Logger.error("Error closing alert stage: " + err.getMessage());
|
||||
}
|
||||
//alertStage.close();
|
||||
if (currentAlertStage == alertStage) {
|
||||
currentAlertStage = null;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import static Config.SomeCodes.config;
|
||||
|
||||
public class MainApplication extends Application {
|
||||
|
||||
final String version = "10072025-PRODUCTION-1.0.2";
|
||||
final String version = "10072025-PRODUCTION-1.0.3";
|
||||
PhotoCleaner photoCleaner;
|
||||
public static Map<Integer, Detectors> detectorsList = new HashMap<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user