프로젝트

일반

사용자정보

개정판 8256aeb4

ID8256aeb4f878f67623d5fffc740f09eb50aef05c
상위 5fb1ee2f
하위 63a0a093, 3fa30e19

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

issue #000: fix linenotracing and add line item

Change-Id: I929540da804aabe103192303c1f6baa0bef0fa11

차이점 보기:

DTI_PID/DTI_PID/App.py
96 96

  
97 97
def handle_unhandled_exception(exc_type, exc_value, exc_traceback):
98 98
    """Handler for unhandled exceptions that will write to the logs"""
99
    if issubclass(exc_type, KeyboardInterrupt):
100
        # call the default excepthook saved at __excepthook__
101
        sys.__excepthook__(exc_type, exc_value, exc_traceback)
102
        return
103 99
    logger.critical("Unhandled exception", exc_info=(exc_type, exc_value, exc_traceback))
104 100

  
105 101
'''
DTI_PID/DTI_PID/ItemTreeWidget.py
144 144
            else:
145 145
                data = item.data(0, self.TREE_DATA_ROLE)
146 146
                if len(indexes) > 0 and data is not None and issubclass(type(data), QEngineeringLineNoTextItem):
147
                    index = indexes[0]
148 147
                    menu = QMenu()
149 148
                    pickColorAction = QAction(self.tr("Select Line Color"))
150 149
                    pickColorAction.triggered.connect(lambda : self.pickColorClickEvent(item))
......
154 153
                    explode_action.setEnabled(not freeze)
155 154
                    explode_action.triggered.connect(lambda : self.explode_line_no(item))
156 155
                    menu.addAction(explode_action)
156
                    if type(data) is QEngineeringLineNoTextItem:
157
                        explodeKeepFromTo_action = QAction(self.tr("Explode (keep from, to)"))
158
                        explodeKeepFromTo_action.setEnabled(not freeze)
159
                        explodeKeepFromTo_action.triggered.connect(lambda : self.explode_line_no(item, True))
160
                        menu.addAction(explodeKeepFromTo_action)
157 161
                    reverse_flow_action = QAction(self.tr("Reverse Flow"))
158 162
                    reverse_flow_action.triggered.connect(lambda : self.reverse_line_flow(item))
159 163
                    menu.addAction(reverse_flow_action)
160 164
                    menu.exec_(self.viewport().mapToGlobal(position))
161 165
                elif len(indexes) > 0 and data is not None and issubclass(type(data), QEngineeringRunItem):
162
                    index = indexes[0]
163 166
                    menu = QMenu()
164 167
                    lineTypeAction = QAction(self.tr("Select Line Type"))
165 168
                    lineTypeAction.triggered.connect(lambda : self.lineTypeClickEvent(item))
DTI_PID/DTI_PID/LineNoTracer.py
378 378

  
379 379
                elif issubclass(type(obj), SymbolSvgItem):
380 380
                    lineMatches = [x for x in self._lines if (x.owner is None or x.owner == start.owner) and (x not in visited) and obj.is_connected(x)]
381

  
382 381
                    if len(lineMatches) > 1: # choose one if connected lines are more than 2
383
                        matches = [x for x in [visited[0], visited[-1]] if obj.is_connected(x)]
382
                        matches = [x for x in visited if obj.is_connected(x)]
383
                        #if len(lineMatches) is 2:
384
                            #print(obj)
385
                            #print([str(visited[0]), str(visited[-2])])
384 386
                        if matches:
387
                            #print(matches[0])
385 388
                            next_connected = [x for x in lineMatches if obj.next_connected(x, matches[0])]
389
                            #print(next_connected)
386 390
                            if next_connected:
387 391
                                lineMatches = next_connected
388 392
                            else:
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py
1305 1305
    def update_arrow(self):
1306 1306
        """ update flow arrow """
1307 1307
        from EngineeringArrowItem import QEngineeringArrowItem
1308
        if self.length() is 0:
1309
            return
1308 1310

  
1309 1311
        start = self.line().p1()
1310 1312
        end = self.line().p2()

내보내기 Unified diff

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