Browse Source

Changed the check on TextContainer default values to allow False-evaluated defaults.

pull/524/head
Nathan Richard 5 years ago
committed by Chris
parent
commit
6a9195b2d2
1 changed files with 2 additions and 1 deletions
  1. 3
      gooey/gui/components/widgets/bases.py

3
gooey/gui/components/widgets/bases.py

@ -56,7 +56,8 @@ class TextContainer(BaseWidget):
self.setColors() self.setColors()
self.SetSizer(self.layout) self.SetSizer(self.layout)
self.Bind(wx.EVT_SIZE, self.onSize) self.Bind(wx.EVT_SIZE, self.onSize)
if self._meta['default']:
# Checking for None instead of truthiness means False-evaluaded defaults can be used.
if self._meta['default'] is not None:
self.setValue(self._meta['default']) self.setValue(self._meta['default'])

Loading…
Cancel
Save