프로젝트

일반

사용자정보

개정판 0de8c1ca

ID0de8c1cabf1c5e4f85545a6ba1e1fbd9e1cb336c
상위 265c2668
하위 8a24877d

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

issue #622: fix item tree init when load drawing

Change-Id: I4f4860a400883856dee873052235ad1abf1cf5a7

차이점 보기:

DTI_PID/DTI_PID/LineNoTracer.py
883 883
            else:
884 884
                remain_count_past = remain_count
885 885

  
886
        # third strp : body connected run sort, not split
886
        # third step : body connected run sort, not split
887 887
        remain_count_past = len(waiting_run_infos)
888 888
        while True:
889 889
            remain_count = 0
DTI_PID/DTI_PID/MainWindow.py
261 261
        self.addMessage.connect(self.onAddMessage)
262 262
        self.actionFindReplaceText.triggered.connect(self.findReplaceTextClicked)
263 263
        self.pushButtonDetectSymbol.clicked.connect(self.onShowDetectSymbol)
264
        #self.graphicsView.scene.contents_changed.connect(self.scene_changed)
264 265

  
265 266
        configs = docData.getAppConfigs('app', 'mode')
266 267
        if configs and 1 == len(configs) and 'advanced' == configs[0].value:
......
2619 2620
        # cv2.destroyAllWindows()
2620 2621
        return (True, mergedOtherLine)
2621 2622

  
2623
    def init_add_tree_item(self, line_no_tree_item, run_item):
2624
        """ insert symbol item and find line no as owner """
2625
        # insert
2626
        self.itemTreeWidget.addTreeItem(line_no_tree_item, run_item)
2627
        # find
2628
        self.itemTreeWidget.addTreeItem(line_no_tree_item, run_item)
2629

  
2622 2630
    def load_drawing(self, drawing):
2623 2631
        """ load drawing """
2624 2632
        from EngineeringRunItem import QEngineeringRunItem
......
2733 2741
                        line_no.runs.append(line_run)
2734 2742

  
2735 2743
                        for run_item in line_run.items:
2736
                            if issubclass(type(run_item), SymbolSvgItem): self.itemTreeWidget.addTreeItem(
2737
                                line_no_tree_item, run_item)
2744
                            if issubclass(type(run_item), SymbolSvgItem):
2745
                                self.init_add_tree_item(line_no_tree_item, run_item)
2738 2746

  
2739 2747
                self.progress.setValue(self.progress.value() + 1)
2740 2748
            QApplication.processEvents()
......
2759 2767
                line_no_tree_item = self.itemTreeWidget.addTreeItem(self.itemTreeWidget.root, line_no)
2760 2768

  
2761 2769
                for run_item in line_run.items:
2762
                    if issubclass(type(run_item), SymbolSvgItem): self.itemTreeWidget.addTreeItem(line_no_tree_item,
2763
                                                                                                  run_item)
2770
                    if issubclass(type(run_item), SymbolSvgItem):
2771
                        self.init_add_tree_item(line_no_tree_item, run_item)
2764 2772

  
2765 2773
                app_doc_data.tracerLineNos.append(line_no)
2766 2774

  
......
2969 2977
                    line_no.runs.append(line_run)
2970 2978

  
2971 2979
                    for run_item in line_run.items:
2972
                        if issubclass(type(run_item), SymbolSvgItem): self.itemTreeWidget.addTreeItem(line_no_tree_item,
2973
                                                                                                      run_item)
2980
                        if issubclass(type(run_item), SymbolSvgItem):
2981
                            self.init_add_tree_item(line_no_tree_item, run_item)
2974 2982

  
2975 2983
                # docData.tracerLineNos.append(line_no)
2976 2984

  
......
2996 3004
                    line_no_tree_item = self.itemTreeWidget.addTreeItem(self.itemTreeWidget.root, line_no)
2997 3005

  
2998 3006
                    for run_item in line_run.items:
2999
                        if issubclass(type(run_item), SymbolSvgItem): self.itemTreeWidget.addTreeItem(line_no_tree_item,
3000
                                                                                                      run_item)
3007
                        if issubclass(type(run_item), SymbolSvgItem):
3008
                            self.init_add_tree_item(line_no_tree_item, run_item)
3001 3009

  
3002 3010
                    docData.tracerLineNos.append(line_no)
3003 3011

  
DTI_PID/DTI_PID/Shapes/EngineeringLineTracerRunItem.py
67 67
            merged_items = run_info1.run.items + run_info2.run.items
68 68
        elif (len(run_info1.run.items) > 1 and len(run_info2.run.items) > 1 and run_info1.run.items[0].is_connected(run_info2.run.items[-1])) or \
69 69
                (len(run_info1.run.items) == 1 and len(run_info2.run.items) > 1 and run_info1.run.items[0].connectors[0].connectedItem is run_info2.run.items[-1]) or \
70
                (len(run_info1.run.items) > 1 and len(run_info2.run.items) == 1 and run_info2.run.items[0].connectors[1].connectedItem is run_info1.run.items[-1]) or \
70
                (len(run_info1.run.items) > 1 and len(run_info2.run.items) == 1 and run_info2.run.items[0].connectors[1].connectedItem is run_info1.run.items[0]) or \
71 71
                (len(run_info1.run.items) == 1 and len(run_info2.run.items) == 1 and run_info1.run.items[0].connectors[0].connectedItem is run_info2.run.items[0] and \
72 72
                    run_info2.run.items[0].connectors[1].connectedItem is run_info1.run.items[0]):
73 73
            connected = True

내보내기 Unified diff

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