프로젝트

일반

사용자정보

개정판 9c4fde10

ID9c4fde106449e36e931e4c7bff0635411b0f5abe
상위 d2ca6c25
하위 e115db8b

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

issue #492: fix from to opc item

Change-Id: I03908804c591c1247599dd4ab9f1826659d6150e

차이점 보기:

DTI_PID/DTI_PID/RecognitionDialog.py
499 499
                                    otherTextInfoList if otherTextInfoList is not None else [],
500 500
                                    titleBlockTextInfoList if titleBlockTextInfoList is not None else [])
501 501

  
502
                if isLineChecked:
503
                    Worker.recognizeLine(mainRes, listWidget, worker.graphicsView, worker, batch)
504
                else:
505
                    lineItems = [item for item in worker.graphicsView.scene.items() if
506
                                 issubclass(type(item), QEngineeringLineItem)]
507
                    app_doc_data.lines.extend(lineItems)
508
                    app_doc_data.allItems.extend(lineItems)
509

  
510
                    for lineItem in lineItems:
511
                        lineItem.owner = None
512
                        for conn in lineItem.connectors:
513
                            conn.connectedItem = None
514
                        worker.graphicsView.scene.removeItem(lineItem)
515

  
516 502
                # check opc validate
517 503
                '''
518 504
                try:
......
540 526
                        worker.displayLog.emit(MessageType.Error, message)
541 527
                '''
542 528

  
529
                if isLineChecked:
530
                    Worker.recognizeLine(mainRes, listWidget, worker.graphicsView, worker, batch)
531
                else:
532
                    lineItems = [item for item in worker.graphicsView.scene.items() if
533
                                 issubclass(type(item), QEngineeringLineItem)]
534
                    app_doc_data.lines.extend(lineItems)
535
                    app_doc_data.allItems.extend(lineItems)
536

  
537
                    for lineItem in lineItems:
538
                        lineItem.owner = None
539
                        for conn in lineItem.connectors:
540
                            conn.connectedItem = None
541
                        worker.graphicsView.scene.removeItem(lineItem)
542

  
543 543
                # connect symbol to symbol
544 544
                try:
545 545
                    configs = app_doc_data.getConfigs('Line Detector', 'Length to connect line')
DTI_PID/DTI_PID/Shapes/QEngineeringOPCItem.py
60 60
    def includes(self, item):
61 61
        topLeft = [item.loc[0], item.loc[1]]
62 62
        bottomRight = [item.loc[0] + item.size[0], item.loc[1] + item.size[1]]
63
        if self.contains(topLeft) and self.contains(bottomRight):
63
        if self.contains_without_scene(topLeft) and self.contains_without_scene(bottomRight):
64 64
            return True
65 65
        else:
66 66
            return False
67 67

  
68
    def contains(self, pt):
68
    def contains_without_scene(self, pt):
69 69
        minX = self.loc[0]
70 70
        minY = self.loc[1]
71 71
        maxX = minX + self.size[0]

내보내기 Unified diff

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