Skip to content

Commit

Permalink
Call on_exit when exiting an app using the exit() method
Browse files Browse the repository at this point in the history
  • Loading branch information
saroad2 committed Sep 27, 2020
1 parent 246ef5c commit cd5996a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/toga/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ def main_loop(self):
def exit(self):
""" Quit the application gracefully.
"""
if self.on_exit is not None:
self.on_exit(self)
self._impl.exit()

@property
Expand Down

0 comments on commit cd5996a

Please sign in to comment.