diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-09-01 16:38:53 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-09-01 20:11:01 -0400 |
| commit | 05327d56dbdcc9392c447fc72ef8dbd5c16f0ddc (patch) | |
| tree | 7de53d67cbc679857a06b2a36f6cea2f36ac3ee6 | |
| parent | e2b5e968340aeab55c4b7c280946640fb3131107 (diff) | |
stop showing 'None' in Params
| -rw-r--r-- | lib/elements/auto_fill.py | 2 | ||||
| -rw-r--r-- | lib/extensions/params.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py index cfee6d7d..9801b610 100644 --- a/lib/elements/auto_fill.py +++ b/lib/elements/auto_fill.py @@ -55,7 +55,7 @@ class AutoFill(Fill): def fill_underlay_angle(self): underlay_angle = self.get_float_param("fill_underlay_angle") - if underlay_angle: + if underlay_angle is not None: return math.radians(underlay_angle) else: return self.angle + math.pi / 2.0 diff --git a/lib/extensions/params.py b/lib/extensions/params.py index c301ed1a..f5da7e8b 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -329,7 +329,7 @@ class ParamsTab(ScrolledPanel): input.Bind(wx.EVT_CHECKBOX, self.changed) elif len(param.values) > 1: - input = wx.ComboBox(self, wx.ID_ANY, choices=sorted(param.values), style=wx.CB_DROPDOWN) + input = wx.ComboBox(self, wx.ID_ANY, choices=sorted(str(value) for value in param.values), style=wx.CB_DROPDOWN) input.Bind(wx.EVT_COMBOBOX, self.changed) input.Bind(wx.EVT_TEXT, self.changed) else: @@ -720,7 +720,7 @@ class Params(InkstitchExtension): getter = 'get_param' values = filter(lambda item: item is not None, - (getattr(node, getter)(param.name, str(param.default)) for node in nodes)) + (getattr(node, getter)(param.name, param.default) for node in nodes)) return values |
