iir.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:pyrpl 作者: lneuhaus 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号