Visualiser model thread was updating GUI instead of fx thread.

main
fjc40 8 years ago
parent 8d9624db96
commit f308f5b8f3

@ -331,8 +331,8 @@ public class RaceViewController extends Controller {
viewSubjects.add(shockwave); viewSubjects.add(shockwave);
boat.legProperty().addListener((o, prev, curr) -> swapColours(curr)); boat.legProperty().addListener((o, prev, curr) -> Platform.runLater(() -> swapColours(curr)));
boat.hasCollidedProperty().addListener((o, prev, curr) -> showCollision(boat, shockwave)); boat.hasCollidedProperty().addListener((o, prev, curr) -> Platform.runLater(() -> showCollision(boat, shockwave)));
} }
// Fix initial bird's-eye position // Fix initial bird's-eye position
view3D.updatePivot(new Translate(250, 0, 210)); view3D.updatePivot(new Translate(250, 0, 210));
@ -741,4 +741,4 @@ public class RaceViewController extends Controller {
} }
} }
} }

Loading…
Cancel
Save