프로젝트

일반

사용자정보

개정판 5e1d20ad

ID5e1d20ada02a42c458ca5c886bf5ca44126bbd4f
상위 ce1fcab9
하위 52437c65

함의성이(가) 8달 전에 추가함

attr freeze

Change-Id: Idd072126b5f7aa658cb70eafe27ce9e16adc5705

차이점 보기:

DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
1621 1621
    def freeze_attriute(self, flag=None):
1622 1622
        from App import App
1623 1623

  
1624
        if flag is None:
1625
            freeze = True
1626
            for _attr, _value in self.attrs.items():
1627
                if _attr.Freeze:
1628
                    freeze = False
1629
                    break
1630
            
1631
            for _attr, _value in self.attrs.items():
1632
                _attr.Freeze = freeze
1624
        try:
1625
            if flag is None:
1626
                freeze = True
1627
                for _attr, _value in self.attrs.items():
1628
                    if _attr.Freeze:
1629
                        freeze = False
1630
                        break
1631
                
1632
                for _attr, _value in self.attrs.items():
1633
                    _attr.Freeze = freeze
1633 1634

  
1634
            App.mainWnd().resultPropertyTableWidget.onSuccessSelectAttribute(self)
1635
        else:
1636
            for _attr, _value in self.attrs.items():
1637
                _attr.Freeze = flag
1635
                labels = [item for item in self.scene().items() if issubclass(type(item), SymbolSvgItem) and (item.iType == 19 or item.iType == 29 or item.iType == 30)]
1636
                if labels:
1637
                    labels = [label for label in labels if label.EvaluatedAttribute('OWNERSYMBOL') == self or \
1638
                            (type(label.EvaluatedAttribute('OWNERSYMBOL')) is str and label.EvaluatedAttribute('OWNERSYMBOL') == str(self.uid))]
1639
                    for label in labels:
1640
                        label.freeze_attriute(freeze)
1641

  
1642
                App.mainWnd().resultPropertyTableWidget.onSuccessSelectAttribute(self)
1643
            else:
1644
                for _attr, _value in self.attrs.items():
1645
                    _attr.Freeze = flag
1646

  
1647
                labels = [item for item in self.scene().items() if issubclass(type(item), SymbolSvgItem) and (item.iType == 19 or item.iType == 29 or item.iType == 30)]
1648
                if labels:
1649
                    labels = [label for label in labels if label.EvaluatedAttribute('OWNERSYMBOL') == self or \
1650
                            (type(label.EvaluatedAttribute('OWNERSYMBOL')) is str and label.EvaluatedAttribute('OWNERSYMBOL') == str(self.uid))]
1651
                    for label in labels:
1652
                        label.freeze_attriute(flag)
1653
        except Exception as ex:
1654
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
1655
                                                          sys.exc_info()[-1].tb_lineno)
1656
            App.mainWnd().addMessage.emit(MessageType.Error, message)
1638 1657

  
1639 1658
    def move_near_main_line(self, length):
1640 1659
        from EngineeringLineItem import QEngineeringLineItem

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)