프로젝트

일반

사용자정보

개정판 d01a2115

IDd01a211530b1f72d29ca4d393474433ef18ab5c4
상위 5cd83a19
하위 d5d3fc59

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

issue #622: line disappear bug testing and disable drawing list progress bar

Change-Id: Id8d5cd78577e5498ad2bb95749b966d9a9442829

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
121 121
        self.symbols.clear()
122 122
        self.lineNos.clear()
123 123
        self.texts.clear()
124
        self.lines.clear()
125 124
        self.unknowns.clear()
126 125
        self.allItems.clear()
127 126
        self.lineIndicators.clear()
128 127
        if trim:
129 128
            self.tracerLineNos.clear()
129
            self.lines.clear()
130 130

  
131 131
    '''
132 132
        @brief      clear
DTI_PID/DTI_PID/LineNoTracer.py
436 436
        worker.displayMessage.emit('Initiating...')
437 437
        docdata = AppDocData.instance()
438 438
        symbols = []
439
        lines = []
439
        lines = docdata.lines
440 440
        lineNos = []
441 441
        spec_breaks = []
442 442
        lineIndicator = []
......
479 479
            elif type(item) is QEngineeringLineItem:
480 480
                #matches = [vendor_package for vendor_package in vendor_packages if vendor_package.includes(item)]
481 481
                #if not matches: lines.append(item)
482
                lines.append(item)
482
                # for check line disappear bug
483
                pass
484
                #lines.append(item)
483 485
            elif type(item) is QEngineeringUnknownItem and item.lineIndicator != 'False':
484 486
                lineIndicator.append(item)
485 487
            elif issubclass(type(item), QEngineeringTextItem):
DTI_PID/DTI_PID/MainWindow.py
485 485
            self.treeWidgetDrawingList.root.setCheckState(0, Qt.Unchecked)
486 486
            files = app_doc_data.getDrawingFileList()
487 487

  
488
            self.progress_bar.setMaximum(len(files))
488
            #self.progress_bar.setMaximum(len(files))
489 489
            count = 0
490
            self.progress_bar.setValue(count)
490
            #self.progress_bar.setValue(count)
491 491
            for file in files:
492 492
                x = [drawing for drawing in drawings if drawing.name == file]
493 493
                if not x or not x[0].UID:
......
503 503
                item.setData(Qt.UserRole, 0, drawing)
504 504

  
505 505
                count += 1
506
                self.progress_bar.setValue(count)
507
                QApplication.processEvents()
506
                #self.progress_bar.setValue(count)
507
                #QApplication.processEvents()
508 508

  
509 509
            self.treeWidgetDrawingList.root.setText(0, self.tr('P&ID Drawings') +
510 510
                                                    f"({self.treeWidgetDrawingList.root.childCount()})")
......
702 702
            app_doc_data.clearItemList(False)
703 703

  
704 704
            items = self.graphicsView.scene.items()
705

  
706
            # for check line disappear bug
707
            disappear_lines = [line for line in app_doc_data.lines if line not in items]
708

  
705 709
            for item in items:
706 710
                if issubclass(type(item), QEngineeringAbstractItem):
707 711
                    app_doc_data.allItems.append(item)
708 712
                    if issubclass(type(item), QEngineeringTextItem):
709 713
                        app_doc_data.texts.append(item)
710 714

  
715
            # for check line disappear bug
716
            if disappear_lines:
717
                app_doc_data.allItems.extend(disappear_lines)
718
                for dis_line in disappear_lines:
719
                    self.addMessage.emit('check', f"disapper line from scene : {str(dis_line)}")
720

  
711 721
            itemTypes = []
712 722
            for item in items:
713 723
                typeExist = False
......
770 780
            item.setFlags(item.flags() | Qt.ItemIsEditable)
771 781
            if messageType == MessageType.Error:
772 782
                item.setBackground(Qt.red)
783
            elif messageType == 'check':
784
                item.setBackground(Qt.yellow)
773 785

  
774 786
            self.listWidgetLog.insertItem(0, item)
775 787
        except Exception as ex:
......
1934 1946
            if type(item) is QEngineeringLineNoTextItem and item in app_doc_data.tracerLineNos:
1935 1947
                app_doc_data.tracerLineNos.pop(app_doc_data.tracerLineNos.index(item))
1936 1948

  
1949
            if type(item) is QEngineeringLineItem:
1950
                app_doc_data.lines.pop(item)
1951

  
1937 1952
            matches = [_item for _item in self.graphicsView.scene.items() if type(_item) is QEngineeringLineNoTextItem]
1938 1953
            matches.extend([lineNo for lineNo in app_doc_data.tracerLineNos if
1939 1954
                            type(lineNo) is QEngineeringTrimLineNoTextItem])
......
2836 2851
            # connect flow item to line
2837 2852
            for line in lines:
2838 2853
                line.update_arrow()
2854
                docData.lines.append(line)
2839 2855
            # for flowMark in [item for item in symbols if type(item) is QEngineeringFlowMarkItem]:
2840 2856
            #    for line in lines:
2841 2857
            #        if flowMark.owner is line:
......
3075 3091
            # connect flow item to line
3076 3092
            for line in lines:
3077 3093
                line.update_arrow()
3094
                docData.lines.append(line)
3078 3095
            # for flowMark in [item for item in symbols if type(item) is QEngineeringFlowMarkItem]:
3079 3096
            #    for line in lines:
3080 3097
            #        if flowMark.owner is line:
DTI_PID/DTI_PID/Shapes/EngineeringTextItem.py
368 368
        @date       18.04.23
369 369
        @history    humkyung 2018.06.30 apply font configuration
370 370
    '''
371

  
372 371
    def addTextItemToScene(self, scene):
373 372
        try:
374 373
            docData = AppDocData.instance()

내보내기 Unified diff

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