From 6a9195b2d2e1ffc81e5e49bf370113dd7c165968 Mon Sep 17 00:00:00 2001 From: Nathan Richard Date: Wed, 13 Nov 2019 14:55:06 +0100 Subject: [PATCH] Changed the check on TextContainer default values to allow False-evaluated defaults. --- gooey/gui/components/widgets/bases.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gooey/gui/components/widgets/bases.py b/gooey/gui/components/widgets/bases.py index c579cf1..600c82e 100644 --- a/gooey/gui/components/widgets/bases.py +++ b/gooey/gui/components/widgets/bases.py @@ -56,7 +56,8 @@ class TextContainer(BaseWidget): self.setColors() self.SetSizer(self.layout) 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'])