프로젝트

일반

사용자정보

개정판 514aa518

ID514aa51897ba25639cb1427032de26e17676dee9
상위 78c75ee8
하위 16666ab8

함의성이(가) 5년 이상 전에 추가함

issue #000: fix auto freeze

Change-Id: I5445961ecad12a18326ec60060e9fd5b0e33124d

차이점 보기:

DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py
102 102

  
103 103
                        while len(self._item._associations[self._attr.AttributeType]) <= self._attr.AttrAt:
104 104
                            self._item._associations[self._attr.AttributeType].append(None)
105
                        self._item.add_assoc_item(item, self._attr.AttrAt)
105
                        self._item.add_assoc_item(item, self._attr.AttrAt, force=True)
106 106
                        for key in self._item.attrs.keys():
107 107
                            if key.Attribute == self._attr.Attribute:
108 108
                                key.AssocItem = item
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py
229 229
                        items = _texts
230 230
                    else:
231 231
                        items = [text for text in _texts if QEngineeringAbstractItem.assoc_type(text) == attr.AttributeType]
232
                        
232

  
233 233
                    if not attr.AssocItem and len(items) > at:
234 234
                        attr.AssocItem = items[at]
235 235
                        item = attr.AssocItem
......
335 335
                self.attrs.clear()
336 336
                self._associations.clear()
337 337

  
338
    def add_assoc_item(self, item, at=None):
338
    def add_assoc_item(self, item, at=None, force=False):
339 339
        """ add given item to association """
340 340

  
341 341
        from EngineeringTextItem import QEngineeringTextItem
......
343 343
        from EngineeringValveOperCodeTextItem import QEngineeringValveOperCodeTextItem
344 344
        from QEngineeringSizeTextItem import QEngineeringSizeTextItem
345 345

  
346
        for key in self.attrs.keys():
347
            if key.Freeze:
348
                return False
346
        if not force:
347
            for key in self.attrs.keys():
348
                if key.Freeze:
349
                    return False
349 350

  
350 351
        _type = QEngineeringAbstractItem.assoc_type(item)
351 352
        if _type is not None:

내보내기 Unified diff

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