From d539a2742320eb262a8484763e45aa039629ecc4 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Mon, 19 Oct 2026 23:16:14 +0200 Subject: [PATCH] ignore duplicate quit events when the window is closed twice quit_event ran its cleanup path again when a second delete-event arrived after the state had already switched to Quit_State, hanging the application on shutdown. Return early instead. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- src/damaris/gui/DamarisGUI.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/damaris/gui/DamarisGUI.py b/src/damaris/gui/DamarisGUI.py index 3f851c5..b366cfb 100644 --- a/src/damaris/gui/DamarisGUI.py +++ b/src/damaris/gui/DamarisGUI.py @@ -333,6 +333,9 @@ class DamarisGUI: """ expecting quit event for main application """ + if self.state == DamarisGUI.Quit_State: + # quit already handled, e.g. window closed twice + return True if self.state in [ DamarisGUI.Edit_State, DamarisGUI.Quit_State ]: self.state = DamarisGUI.Quit_State # do a cleanup...