def list_changed(self, module, operation, index, value=None):
""" make sure that an element from one of the four lists is selected at once"""
if operation == 'select':
# unselect all others
if not hasattr(module, '_selecting') or not getattr(module, '_selecting'):
try:
setattr(module, '_selecting', True)
for name in [start+'_'+end for start in ['real', 'complex'] for end in ['poles', 'zeros']]:
if name != self.name:
getattr(module, name).selected = None
module._logger.info('%s.selected = None', name)
setattr(module, '_selected_pole_or_zero', self.name)
setattr(module, '_selected_index', index)
finally:
setattr(module, '_selecting', False)
super(IirFloatListProperty, self).list_changed(module, operation, index, value=value)
module._signal_launcher.update_plot.emit()
else:
super(IirFloatListProperty, self).list_changed(module, operation, index, value=value)
评论列表
文章目录