kopia lustrzana https://github.com/inkstitch/inkstitch
stop showing 'None' in Params
rodzic
e2b5e96834
commit
05327d56db
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue