WIN_CLOSED bulk update. No more test for event is None, use WIN_CLOSED instead

This commit is contained in:
PySimpleGUI 2020-05-07 06:22:59 -04:00
parent 6174b355a6
commit 0076b461f5
135 changed files with 395 additions and 349 deletions

View file

@ -29,7 +29,7 @@ while True:
if window2_active:
event2 = window2.read()[0]
if event2 in (None, 'Exit', '< Prev'):
if event2 in (sg.WIN_CLOSED, 'Exit', '< Prev'):
window2_active = False
window2.close()
window.un_hide()
@ -48,7 +48,7 @@ while True:
window3_active = False
window2_active = True
window2.un_hide()
elif ev3 in (None, 'Exit'):
elif ev3 in (sg.WIN_CLOSED, 'Exit'):
break
window.close()