Merge pull request #20 from SemjonKerner/quit_ask

Add messagebox for quit while engine running
This commit is contained in:
Adam Saudagar 2020-12-13 13:00:51 +05:30 committed by GitHub
commit e912ce980c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,8 +118,8 @@ def _create(gui: 'GUI'):
# noinspection PyProtectedMember
def set_destroy():
if gui._bot_running:
logging.info("Turn off the bot engine first")
return
if(not messagebox.askyesno(title="Quit?", message="Bot engine running. Quit Anyway?")):
return
config.set("win_loc", gui._root.geometry())
gui._destroyed = True