프로젝트

일반

사용자정보

개정판 db336ebd

IDdb336ebd509a70e818806c632cca2e4649b134cc
상위 ed67b334
하위 1cd1bacc, 474edf59

백흠경이(가) 약 5년 전에 추가함

issue #641: fixed the function to show count of items

Change-Id: I9d5f568da2be7397ea51594aaeaa4d2999bdb184

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
255 255
        self.actionImport_Text_From_CAD.triggered.connect(self.onImportTextFromCAD)
256 256
        self.actionSymbol_Thickness_Reinforcement.triggered.connect(self.onSymbolThickness)
257 257
        self.actionHelp.triggered.connect(self.on_help)
258
        self.graphicsView.scene.contents_changed.connect(self.onSceneChanged)
259 258
        self.graphicsView.scene.selectionChanged.connect(self.onSelectionChanged)
260 259
        self.actionInitialize.triggered.connect(self.onInitializeScene)
261 260
        self.actionSave.triggered.connect(self.actionSaveCliked)
......
583 582
        self.dlgTextItemEdit.show()
584 583
        self.dlgTextItemEdit.exec_()
585 584

  
586
    '''
587
        @brief      show unknownitem's count
588
        @author     humkyung
589
        @date       2018.08.23
590
        @history    humkyung 2018.08.30 display count of symbol, line, text
591
    '''
585
    def display_number_of_items(self):
586
        """display count of symbol, line, text"""
592 587

  
593
    def onSceneChanged(self):
594 588
        items = [item for item in self.graphicsView.scene.items() if type(item) is QEngineeringUnknownItem]
595 589
        if len(items) > 0:
596 590
            self.labelStatus.setText(
......
851 845
    def scene_changed(self):
852 846
        """update modified flag"""
853 847

  
848
        self.display_number_of_items()
849

  
854 850
        app_doc_data = AppDocData.instance()
855 851
        app_doc_data.activeDrawing.modified = True
856 852
        title = self.windowTitle()
......
1332 1328
                    else:
1333 1329
                        self.load_drawing(app_doc_data.activeDrawing)
1334 1330

  
1331
                    self.display_number_of_items()
1335 1332
                    # connect scene changed signal
1336 1333
                    self.graphicsView.scene.contents_changed.connect(self.scene_changed)
1337 1334
                finally:

내보내기 Unified diff

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