stop showing 'None' in Params

pull/301/head
Lex Neva 2018-09-01 16:38:53 -04:00
rodzic e2b5e96834
commit 05327d56db
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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