프로젝트

일반

사용자정보

개정판 93015407

ID93015407a225b84496350d1e2e54c5fa71f8cb98
상위 c67b54b5
하위 739b56f7, 7bc82980

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

issue #538: add j function to insert and connect flange...

Change-Id: I47ce52951d118d8a13b470f5618bbfaff43275aa

차이점 보기:

DTI_PID/DTI_PID/QtImageViewer.py
704 704
                     type(item) is not QGraphicsPixmapItem and type(item) is not QGraphicsTextItem]
705 705
            items = [item for item in items if item.parentItem() is svg]
706 706
            if items and connectors[0].connectedItem and type(connectors[0].connectedItem) is QEngineeringLineItem:
707
                items[0].connectedItem = connectors[0].parentItem()
707
                items[0].connect(connectors[0].parentItem())
708 708
                anotherConns = [conn for conn in svg.connectors if conn is not items[0]]
709
                anotherConns[0].connectedItem = connectors[0].connectedItem
709
                anotherConns[0].connect(connectors[0].connectedItem)
710 710
                for lineConn in connectors[0].connectedItem.connectors:
711 711
                    if lineConn.connectedItem is connectors[0].parentItem():
712
                        lineConn.connectedItem = svg
712
                        lineConn.connect(svg)
713 713
                        lineConn.setPos(anotherConns[0].center())
714 714
                        break
715
                connectors[0].connectedItem = svg
715
                connectors[0].connect(svg)
716 716
                lineConn.transfer.onPosChanged.emit(lineConn)
717 717
            elif items:
718
                items[0].connectedItem = connectors[0].parentItem()
719
                items[0].highlight(False)
718
                items[0].connect(connectors[0].parentItem())
719
                #items[0].highlight(False)
720 720
                if connectors[0].connectedItem:
721 721
                    for conn in connectors[0].connectedItem.connectors:
722 722
                        if conn.connectedItem is connectors[0].parentItem():
723
                            conn.connectedItem = None
724
                            conn.highlight(False)
723
                            conn.connect(None)
724
                            #conn.highlight(False)
725 725
                            break
726
                connectors[0].connectedItem = svg
727
                connectors[0].highlight(False)
726
                connectors[0].connect(svg)
727
                #connectors[0].highlight(False)
728 728
        else:
729 729
            svg.angle = 0.0
730 730
            svg.loc = [round(scenePos.x() - svg.symbolOrigin[0], 1), round(scenePos.y() - svg.symbolOrigin[1], 1)]
......
747 747
                    svg.angle = angle + rAngle if angle + rAngle < 2 * math.pi else angle + rAngle - 2 * math.pi
748 748
                    '''
749 749

  
750
                    svg.connectors[0].connectedItem = items[0].parentItem()
751
                    svg.connectors[0].highlight(False)
752
                    items[0].connectedItem = svg
753
                    items[0].highlight(False)
750
                    svg.connectors[0].connect(items[0].parentItem())
751
                    #svg.connectors[0].highlight(False)
752
                    items[0].connect(svg)
753
                    #items[0].highlight(False)
754 754

  
755 755
            svg.addSvgItemToScene(self.scene())
756 756

  

내보내기 Unified diff

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