프로젝트

일반

사용자정보

개정판 03b91df8

ID03b91df8473ed48788674e8fbd5bb38fb134fbda
상위 8cac1460
하위 4c3acf29

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

fix dictionary split, grid test

Change-Id: If040920ee9d8f86d60074cb51e31081e938b21e9

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
2052 2052
                if found:
2053 2053
                    founds = [_text.strip() for _text in found.split(',')]
2054 2054

  
2055
                    loc = text.loc[0]
2055
                    loc = text.loc[0] if text.angle == 0 else text.loc[1] + text.size[1]
2056 2056
                    for _found in founds:
2057 2057
                        match = re.search(_found, text.text(), re.DOTALL)
2058 2058
                        if match:
2059 2059
                            _text = text.text()[match.start():match.end()]
2060
                            width = text.size[0] * len(_text) / len(text.text())
2061
                            textInfo = TextInfo(_text, loc, text.loc[1], width, text.size[1], text.angle)
2062

  
2060
                            width = text.size[1] * len(_text) / len(text.text())
2061
                            if text.angle == 0:
2062
                                textInfo = TextInfo(_text, loc, text.loc[1], width, text.size[1], text.angle)
2063
                            else:
2064
                                loc = loc - width
2065
                                textInfo = TextInfo(_text, text.loc[0], loc, text.size[0], width, text.angle)
2063 2066
                            item = QEngineeringTextItem.create_text_with(self.graphicsView.scene(), textInfo)
2064 2067
                            item.transfer.onRemoved.connect(self.itemRemoved)
2065 2068

  
2066
                            loc = loc + width
2069
                            loc = loc + width if text.angle == 0 else loc
2067 2070

  
2068 2071
                    text.transfer.onRemoved.emit(text)
2069 2072
            except Exception as ex:
DTI_PID/DTI_PID/QtImageViewer.py
652 652
        from EngineeringUnknownItem import QEngineeringUnknownItem
653 653
        import math
654 654
        from App import App
655
        from AppDocData import AppDocData
655 656

  
656 657
        try:
657 658
            svg.transfer.onRemoved.connect(App.mainWnd().itemRemoved)
......
736 737
                svg.angle = angle if angle else 0.0
737 738
                svg.flip = flip if flip else 0
738 739
                svg.loc = [round(scenePos.x() - svg.symbolOrigin[0], 1), round(scenePos.y() - svg.symbolOrigin[1], 1)]
739
                svg.origin = [round(scenePos.x(), 1), round(scenePos.y(), 1)]
740
                configs = AppDocData.instance().getConfigs('Data', 'Grid')
741
                grid = int(configs[0].value) if 1 == len(configs) else -1
742
                if grid == 1:
743
                    svg.origin = [round(scenePos.x()), round(scenePos.y())]
744
                else:
745
                    svg.origin = [round(scenePos.x(), 1), round(scenePos.y(), 1)]
740 746
                if len(svg.connectors) == 1:
741 747
                    # single connection item assistant
742 748
                    connectors = [connector for connector in connectors if connector.parentItem() is not svg and not connector.connectedItem]

내보내기 Unified diff

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