Fixed comment about checking for window closed

This commit is contained in:
PySimpleGUI 2020-08-07 07:34:51 -04:00
parent f0b590098e
commit e785dc79a4
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,8 @@ import PySimpleGUI as sg
There's an added capability to "re-open" window 2 should it be closed. This is done by simply calling the make_win2 function There's an added capability to "re-open" window 2 should it be closed. This is done by simply calling the make_win2 function
again when the button is pressed in window 1. again when the button is pressed in window 1.
The program exits when both windows have been closed
Copyright 2020 PySimpleGUI.org Copyright 2020 PySimpleGUI.org
""" """
@ -43,7 +45,7 @@ def main():
window.close() window.close()
if window == window2: # if closing win 2, mark as closed if window == window2: # if closing win 2, mark as closed
window2 = None window2 = None
elif window == window1: # if closing win 1, exit program elif window == window1: # if closing win 1, mark as closed
window1 = None window1 = None
elif event == 'Reopen': elif event == 'Reopen':
if not window2: if not window2: