Added check toi automatically close hidden window when last window is closed
This commit is contained in:
parent
7a30a808a4
commit
11ad67b6b2
|
@ -4097,6 +4097,13 @@ class Window:
|
|||
# _my_windows.Decrement()
|
||||
except:
|
||||
pass
|
||||
# if down to 1 window, try and destroy the hidden window, if there is one
|
||||
if Window.NumOpenWindows == 1:
|
||||
try:
|
||||
Window.hidden_master_root.destroy()
|
||||
Window.NumOpenWindows = 0 # if no hidden window, then this won't execute
|
||||
except:
|
||||
pass
|
||||
|
||||
CloseNonBlockingForm = Close
|
||||
CloseNonBlocking = Close
|
||||
|
@ -4503,16 +4510,6 @@ def EncodeRadioRowCol(container, row, col):
|
|||
RadValue = container*100000 + row * 1000 + col
|
||||
return RadValue
|
||||
|
||||
|
||||
# --------------------------------------------------------------#
|
||||
# Closes the hidden master window so PySimpleGUI can be closed #
|
||||
# --------------------------------------------------------------#
|
||||
|
||||
def ClosePySimpleGUI():
|
||||
Window.hidden_master_root.destroy()
|
||||
Window.DecrementOpenCount()
|
||||
|
||||
|
||||
# ------- FUNCTION BuildResults. Form exiting so build the results to pass back ------- #
|
||||
# format of return values is
|
||||
# (Button Pressed, input_values)
|
||||
|
|
Loading…
Reference in New Issue