개정판 37be607a
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