프로젝트

일반

사용자정보

개정판 97a795c0

ID97a795c0d0239acd55b0efcb17b0535017eceb01
상위 a4289964
하위 fdbc9ca0

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

issue #000: fix size unit

Change-Id: I543c55de16af0aa5a873820ea083278428833fb8

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
819 819
        self.project = project
820 820
        project.make_sub_directories()
821 821
        try:
822
            # save size unit
823
            self.saveConfigs([Config('Project', 'Unit', project.prj_unit)])
824

  
822 825
            if self.project.database.db_type == 'SQLite':
823 826
                # Creates or opens a file called mydb with a SQLite3 DB
824 827
                db_path = self.project.database.file_path
......
847 850
                                finally:
848 851
                                    file.close()
849 852
                        conn.commit()
850
                        self.saveConfigs([Config('Project', 'Unit', project.prj_unit)])
851 853
                except Exception as ex:
852 854
                    print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
853 855
                                                              sys.exc_info()[-1].tb_lineno))
DTI_PID/DTI_PID/Shapes/EngineeringReducerItem.py
45 45
            first, second = '', ''
46 46
            text = matches[0].text().replace("'", '"').upper()
47 47
            # for imperial
48
            if text.find('"') is not -1:
48
            if sizeUnit == 'Imperial' and text.find('"') is not -1:
49 49
                first = text[:text.find('"') + 1]
50 50

  
51 51
                text = text[text.find('"') + 1:].replace(delimiter.upper(), '',
DTI_PID/DTI_PID/TextItemFactory.py
335 335

  
336 336
        first, second = None, None
337 337
        # for imperial
338
        if text.find('"') is not -1:
338
        if sizeUnit == 'Imperial' and text.find('"') is not -1:
339 339
            first = text[:text.find('"') + 1]
340 340
            second = text[text.find('"') + 1:].replace(delimiter.upper(), '',
341 341
                                                       1).strip() if delimiter is not None else text[text.find(
342 342
                '"') + 1:].strip()
343
        elif sizeUnit == 'Imperial':
344
            first = text.split(delimiter.upper())[0]
345
            second = text.split(delimiter.upper())[1] if len(text.split(delimiter.upper())) == 2 else None
343 346
        # for metric
344 347
        else:
345 348
            split_text = text.strip().split(delimiter.upper())

내보내기 Unified diff

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