프로젝트

일반

사용자정보

개정판 acb0d663

IDacb0d663cc84001b9fae3a9b24d1b1bfd7ac1dea
상위 5e21eb5d
하위 e4aed1c5

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

add text area update

Change-Id: I8cf3a0626421d89c027a43eac51f91edb1a79be8

차이점 보기:

DTI_PID/DTI_PID/LineNoTracer.py
900 900
        if update_stream_no:
901 901
            set_stream_no(worker)
902 902

  
903
        ''' update text area '''
904
        update_text_area(worker)
905

  
903 906
        ''' visible on '''
904 907
        ALL_ITEM = [item for item in worker.scene.items() if issubclass(type(item), QEngineeringAbstractItem)]
905 908
        for item in ALL_ITEM:
......
1028 1031
                                                       sys.exc_info()[-1].tb_lineno)
1029 1032
        worker.display_message.emit(message)
1030 1033

  
1034
def update_text_area(worker):
1035
    ''' update text area '''
1036

  
1037
    from Area import Area
1038

  
1039
    try:
1040
        app_doc_data = AppDocData.instance()
1041

  
1042
        areas = app_doc_data.getAreaList()
1043
        title_area_list = app_doc_data.getTitleBlockProperties()
1044
        title_list = []
1045
        if title_area_list:
1046
            for title_area in title_area_list:
1047
                area = Area(title_area[0])
1048
                area.parse(title_area[2])
1049
                title_list.append(area)
1050
        areas.extend(title_list)
1051

  
1052
        texts = [item for item in worker.scene.items() if issubclass(type(item), QEngineeringTextItem)]
1053
        for text in texts:
1054
            if text.area == 'None' or not text.area:
1055
                for area in areas:
1056
                    if area.contains([text.center().x(), text.center().y()]):
1057
                        text.area = area.name
1058
                        break
1059

  
1060
    except Exception as ex:
1061
        message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename,
1062
                                                       sys.exc_info()[-1].tb_lineno)
1063
        worker.display_message.emit(message)
1031 1064

  
1032 1065
def make_spec(worker, spec_breaks, lines, lineNos):
1033 1066
    ''' update spec break '''

내보내기 Unified diff

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