diff --git a/game/ato/flight.py b/game/ato/flight.py index 405a5fb1..e3c39463 100644 --- a/game/ato/flight.py +++ b/game/ato/flight.py @@ -270,11 +270,7 @@ class Flight(SidcDescribable): results.kill_pilot(self, pilot) def recreate_flight_plan(self) -> None: - from game.sim.gameupdateevents import GameUpdateEvents - from game.server import EventStream - self._flight_plan_builder.regenerate() - EventStream.put_nowait(GameUpdateEvents().update_flight(self)) @staticmethod def clone_flight(flight: Flight) -> Flight: diff --git a/qt_ui/windows/SquadronDialog.py b/qt_ui/windows/SquadronDialog.py index 3d162ee1..13e8ef82 100644 --- a/qt_ui/windows/SquadronDialog.py +++ b/qt_ui/windows/SquadronDialog.py @@ -19,6 +19,8 @@ from PySide2.QtWidgets import ( from game.ato.flightplans.custom import CustomFlightPlan from game.ato.flighttype import FlightType from game.ato.flightwaypointtype import FlightWaypointType +from game.server import EventStream +from game.sim import GameUpdateEvents from game.squadrons import Pilot, Squadron from game.theater import ConflictTheater, ControlPoint from qt_ui.delegates import TwoColumnRowDelegate @@ -212,6 +214,7 @@ class SquadronDialog(QDialog): wpt.position = wpt.control_point.position break f.recreate_flight_plan() + EventStream.put_nowait(GameUpdateEvents().update_flight(f)) def on_destination_changed(self, index: int) -> None: with report_errors("Could not change squadron destination", self):