프로젝트

일반

사용자정보

개정판 37be607a

ID37be607a1eb1a7d30578af66902229c2759c6cf6
상위 6c3575de
하위 499f57b0

임예철이(가) 3년 이상 전에 추가함

Rotation 툴바 추가

Change-Id: Ic867a3f6ced31f6d1079ce2e4291c2e1d2c25c01

차이점 보기:

HYTOS/HYTOS/AppDocData.py
42 42

  
43 43

  
44 44
class AppDocData(SingletonInstane):
45
    __DOC_VER__ = '3'
45 46

  
46 47
    def __init__(self):
47 48

  
......
309 310
                    finally:
310 311
                        file.close()
311 312
                conn.commit()
313

  
314
                cursor.execute("SELECT sql FROM sqlite_master WHERE name='Components' AND sql LIKE '%ScaleX%';")
315
                ScaleX = cursor.fetchall()
316
                if not ScaleX:
317
                    cursor.execute('''create table Copy_Components 
318
                        (UID TEXT NOT NULL, Symbols_UID TEXT NOT NULL, Name TEXT, [Index] INTEGER, X REAL, Y REAL, 
319
                        Rotation REAL, ScaleX REAL DEFAULT 1, ScaleY REAL DEFAULT 1,
320
                        CONSTRAINT PK_Components PRIMARY KEY (
321
                                UID
322
                            ),
323
                            CONSTRAINT FK_Symbols_UID FOREIGN KEY (
324
                                Symbols_UID
325
                            )
326
                            REFERENCES Symbols (UID)); ''')
327
                    cursor.execute('''insert into Copy_Components (UID, Symbols_UID, Name, [Index], X, Y, Rotation)
328
                        select UID, Symbols_UID, Name, [Index], X, Y, Rotation from Components;''')
329

  
330
                    #cursor.execute("drop table Components;")
331
                    #cursor.execute("alter table Copy_Components rename to Components;")
332
                    conn.commit()
333
                    print("컬럼추가성공") #conn.commit()?
334

  
312 335
        # Catch the exception
313 336
        except Exception as ex:
314 337
            from App import App
......
1837 1860
    @activeDrawing.setter
1838 1861
    def activeDrawing(self, value):
1839 1862
        self._activeDrawing = value
1863

  
1864
    '''
1865
        @brief  Add ScaleX and ScaleY columns to existing files
1866
        @author HyunJun
1867
        @date   2021.05.11
1868
    '''
1869

  
1870
    #def add_column_ScaleXY(self):

내보내기 Unified diff

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