Fix for crash when opening window twice with ComboBoxes

This commit is contained in:
MikeTheWatchGuy 2019-06-28 16:56:25 -04:00
parent 1290b01d60
commit 7499d3f989
1 changed files with 5 additions and 1 deletions

View File

@ -7130,7 +7130,11 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
# print(unique_field)
# Clones over the TCombobox.field element from the "alt" theme.
# This is what will allow us to change the background color without altering the whole programs theme
combostyle.element_create(unique_field, "from", "alt")
try: # if this element is in a window that's shown TWICE, will get an error here, so skip error
combostyle.element_create(unique_field, "from", "alt")
except:
pass
# Create widget layout using cloned "alt" field
combostyle.layout(style_name, [