프로젝트

일반

사용자정보

개정판 0ad1d9ae

ID0ad1d9aee1c66369037fc14577513662614ee6ca
상위 a76fc633
하위 ade0b2c6

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

issue #538: fix rotate and test

Change-Id: I0ff7ada64f14f6e2a783050482c93265838b9694

차이점 보기:

DTI_PID/DTI_PID/Commands/RotateCommand.py
41 41
                angle = item.rotation()
42 42
                _params.append(angle)
43 43
                item.rotate(math.radians((angle + 90) % 360 if angle in [0, 90, 180, 270, 360] else 0))
44
                item.angle = math.radians(item.rotation())
44 45

  
45 46
            self._params = _params
46 47
            self._scene.update()
DTI_PID/DTI_PID/MainWindow.py
2040 2040
                for connector in target_symbol.connectors:
2041 2041
                    svg = self.graphicsView.createSymbolObject(symName)
2042 2042
                    if len(svg.connectors) > 1: 
2043
                        if target_symbol.connectors.index(connector) in index and \
2043
                        if ((target_symbol.conn_type and target_symbol.connectors.index(connector) in index) or not target_symbol.conn_type) and \
2044 2044
                                    (not connector.connectedItem or (connector.connectedItem and type(connector.connectedItem) is QEngineeringLineItem)):
2045 2045
                            self.graphicsView.matchSymbolToLine(svg, connector.sceneBoundingRect().center())
2046 2046
                    elif len(svg.connectors) == 1:
2047
                        if target_symbol.connectors.index(connector) in index and not connector.connectedItem:
2047
                        if ((target_symbol.conn_type and target_symbol.connectors.index(connector) in index) or not target_symbol.conn_type) and \
2048
                                    not connector.connectedItem:
2048 2049
                            self.graphicsView.matchSymbolToLine(svg, connector.sceneBoundingRect().center())
2049 2050

  
2050 2051
                if target_symbol:
DTI_PID/DTI_PID/ReplaceSymbolDialog.py
107 107
                targets = []
108 108
                for item in items:
109 109
                    for conn in item.connectors[:2]:
110
                        if conn.parentItem().has_connection and not conn.connectedItem and package.includes(conn, margin = 50):
110
                        if conn.parentItem().has_connection and not conn.connectedItem and package.includes(conn, margin = 100):
111 111
                            matches = [target for target in targets if target.parentItem() is conn.parentItem()]
112 112
                            if not matches:
113 113
                                targets.append(conn)

내보내기 Unified diff

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