Skip to content

Commit

Permalink
gui: when closing the app with a running session and cancel is select…
Browse files Browse the repository at this point in the history
…ed, avoid closing the app
  • Loading branch information
bharnden committed Dec 14, 2024
1 parent a26b354 commit 8df6b06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daemon/core/gui/menubar.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,13 @@ def prompt_save_running_session(self, quit_app: bool = False) -> None:
result = True
if self.core.is_runtime():
result = messagebox.askyesnocancel("Exit", "Stop the running session?")
# cancel was clicked, avoid doing anything
if result is None:
return
# exit was selected, delete session
if result:
self.core.delete_session()
# we want to exist the app
if quit_app:
self.app.quit()

Expand Down

0 comments on commit 8df6b06

Please sign in to comment.