Maybe fixed updating boat list on FX thread.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package visualiser.model;
|
||||
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.scene.paint.Color;
|
||||
@@ -182,7 +183,7 @@ public class VisualiserRaceState extends RaceState {
|
||||
|
||||
boat.setCurrentLeg(getLegs().get(0));
|
||||
|
||||
existingBoats.add(boat);
|
||||
Platform.runLater(() -> existingBoats.add(boat));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user