Merge pull request #1435 from PySimpleGUI/Dev-latest
Added check toi automatically close hidden window when last window is…
This commit is contained in:
commit
ff1bcf551e
|
@ -4097,6 +4097,13 @@ class Window:
|
||||||
# _my_windows.Decrement()
|
# _my_windows.Decrement()
|
||||||
except:
|
except:
|
||||||
pass
|
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
|
CloseNonBlockingForm = Close
|
||||||
CloseNonBlocking = Close
|
CloseNonBlocking = Close
|
||||||
|
@ -4503,16 +4510,6 @@ def EncodeRadioRowCol(container, row, col):
|
||||||
RadValue = container*100000 + row * 1000 + col
|
RadValue = container*100000 + row * 1000 + col
|
||||||
return RadValue
|
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 ------- #
|
# ------- FUNCTION BuildResults. Form exiting so build the results to pass back ------- #
|
||||||
# format of return values is
|
# format of return values is
|
||||||
# (Button Pressed, input_values)
|
# (Button Pressed, input_values)
|
||||||
|
|
Loading…
Reference in New Issue