프로젝트

일반

사용자정보

개정판 0b9c35fe

ID0b9c35fe8ab42c17dbe5bb0ef16e6ab3121fa406
상위 289417f5
하위 9195cee8, 342a9003

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

issue #000: when item deleted from scene assoc and attr item will free

Change-Id: Ia22460c68702f754045ef94e45ddaf4de81c47ec

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
1604 1604
                if match.owner is item:
1605 1605
                    match.owner = None
1606 1606

  
1607
            matches = [_item for _item in self.graphicsView.scene.items() if hasattr(_item, 'attrs')]
1608
            done = False
1609
            for match in matches:
1610
                for assoc in match.associations():
1611
                    if item is assoc:
1612
                        match.remove_assoc_item(item)
1613
                        for attr in match.attrs.keys():
1614
                            if str(item.uid) == str(attr.AssocItem.uid):
1615
                                attr.AssocItem = None
1616
                                match.attrs[attr] = ''
1617
                                done = True
1618
                                break
1619
                        break
1620
                if done: break
1621

  
1607 1622
            if item.scene() is not None: item.scene().removeItem(item)
1608 1623
        except Exception as ex:
1609 1624
            message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)

내보내기 Unified diff

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