diff --git a/daemon/core/gui/coreclient.py b/daemon/core/gui/coreclient.py index 86329591..64255903 100644 --- a/daemon/core/gui/coreclient.py +++ b/daemon/core/gui/coreclient.py @@ -111,13 +111,16 @@ class CoreClient: self.links.clear() self.hooks.clear() self.emane_config = None - for mobility_player in self.mobility_players.values(): - mobility_player.handle_close() + self.close_mobility_players() self.mobility_players.clear() # clear streams self.cancel_throughputs() self.cancel_events() + def close_mobility_players(self): + for mobility_player in self.mobility_players.values(): + mobility_player.close() + def set_observer(self, value: str): self.observer = value diff --git a/daemon/core/gui/dialogs/mobilityplayer.py b/daemon/core/gui/dialogs/mobilityplayer.py index e822aa4b..1cd62684 100644 --- a/daemon/core/gui/dialogs/mobilityplayer.py +++ b/daemon/core/gui/dialogs/mobilityplayer.py @@ -37,7 +37,7 @@ class MobilityPlayer: self.dialog = MobilityPlayerDialog( self.master, self.app, self.canvas_node, self.config ) - self.dialog.protocol("WM_DELETE_WINDOW", self.handle_close) + self.dialog.protocol("WM_DELETE_WINDOW", self.close) if self.state == MobilityAction.START: self.set_play() elif self.state == MobilityAction.PAUSE: @@ -46,7 +46,7 @@ class MobilityPlayer: self.set_stop() self.dialog.show() - def handle_close(self): + def close(self): if self.dialog: self.dialog.destroy() self.dialog = None diff --git a/daemon/core/gui/toolbar.py b/daemon/core/gui/toolbar.py index ee37df32..49a4ab0c 100644 --- a/daemon/core/gui/toolbar.py +++ b/daemon/core/gui/toolbar.py @@ -448,6 +448,7 @@ class Toolbar(ttk.Frame): """ logging.info("clicked stop button") self.app.menubar.change_menubar_item_state(is_runtime=False) + self.app.core.close_mobility_players() task = ProgressTask( self.app, "Stop", self.app.core.stop_session, self.stop_callback )