Public Access
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 <vibe@mistral.ai>
This commit is contained in:
1 parent
34eb7b2728
commit
d539a27423
1 file changed
+3
@@ -333,6 +333,9 @@ class DamarisGUI:
|
|||||||
"""
|
"""
|
||||||
expecting quit event for main application
|
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 ]:
|
if self.state in [ DamarisGUI.Edit_State, DamarisGUI.Quit_State ]:
|
||||||
self.state = DamarisGUI.Quit_State
|
self.state = DamarisGUI.Quit_State
|
||||||
# do a cleanup...
|
# do a cleanup...
|
||||||
|
|||||||
Reference in new issue
Block a user