프로젝트

일반

사용자정보

개정판 8388ce5c

ID8388ce5c1123e4f1c80f2bea18d85e46b857874a
상위 d0d5ed29
하위 31437e90

함의성이(가) 약 6년 전에 추가함

issue #000: fix LineNoTracer

Change-Id: Iebd9479b422eb25bf20d45b112e63fac2d0041e3

차이점 보기:

DTI_PID/DTI_PID/ItemTreeWidget.py
749 749
                        return
750 750

  
751 751
        ## Not found
752
        QMessageBox.warning(self, self.tr('Error'), self.tr('Can not find data for the selected symbol.'))
752
        #QMessageBox.warning(self, self.tr('Error'), self.tr('Can not find data for the selected symbol.'))
753 753
    
754 754
    '''
755 755
        @brief      remove given item
DTI_PID/DTI_PID/LineNoTracer.py
108 108
                    if line.owner is not None: continue
109 109

  
110 110
                    line_matches = [x for x in self._lines if x.owner and line.is_connected(x, QEngineeringAbstractItem.CONNECTED_AT_BODY)]
111
                    symbol_matches = [x for x in self._symbols if x.owner and line.is_connected(x)]
111
                    symbol_matches = [x for x in self._symbols if x.owner and line.is_connected(x) and x.canBeSecondary(line)]
112 112
                    if line_matches or symbol_matches:
113 113
                        foundCount += 1
114 114
                        connected_items = self.find_connected_objects(line)
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
478 478
        return len(_connectors) > 0
479 479

  
480 480
    def next_connected(self, lhs, rhs):
481
        """ tes given two item's are next connected(ex: 0-1, 2-3) """
481
        """ check given two item's are next connected(ex: 0-1, 2-3) """
482 482

  
483 483
        lhs_matches = [at for at in range(len(self.connectors)) if self.connectors[at].connectedItem == lhs]
484 484
        rhs_matches = [at for at in range(len(self.connectors)) if self.connectors[at].connectedItem == rhs]
......
487 487

  
488 488
        return False
489 489

  
490
    def canBeSecondary(self, line):
491
        """ check given line is not connected(ex: 0-1, 2-3) """
492
        preItem = None
493

  
494
        item = [item.connectedItem for item in self.connectors if item.connectedItem is not None and item.connectedItem.owner is not None]
495
        if item:
496
            preItem = item[0]
497

  
498
        if preItem is not None and not self.next_connected(line, preItem):
499
            return True
500
        else:
501
            return False
502

  
490 503
    '''
491 504
        @brief      connect line and symbol is able to be connected and return line
492 505
        @author     humkyung

내보내기 Unified diff

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