개정판 c99d9d76
issue #1171: fix symbol data
Change-Id: If77f8b4ce9692c67e89d5a637c9fb4dc963c5a5a
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
1946 | 1946 |
# Get a cursor object |
1947 | 1947 |
cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True) |
1948 | 1948 |
|
1949 |
sql = "select a.*,b.Name,b.SymbolType_UID,b.[Type],b.OriginalPoint,b.ConnectionPoint,b.BaseSymbol,b.AdditionalSymbol,b.HasInstrumentLabel,b.Flip from Components a \ |
|
1949 |
sql = "select a.*,b.Name,b.SymbolType_UID,b.[Type],b.OriginalPoint,b.ConnectionPoint,b.BaseSymbol,b.AdditionalSymbol,b.HasInstrumentLabel,b.Flip as DetectFlip from Components a \
|
|
1950 | 1950 |
join Symbol b on a.Symbol_UID=b.UID \ |
1951 | 1951 |
where a.Drawings_UID='{}'".format(drawing) |
1952 | 1952 |
cursor.execute(sql) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
466 | 466 |
res.append((sql, tuple(param))) |
467 | 467 |
|
468 | 468 |
cols = ['UID', 'Drawings_UID', 'Symbol_UID', 'X', 'Y', 'Width', 'Height', 'Rotation', 'Area', 'Owner', 'Connected', '[Supplied By]', \ |
469 |
'SpecialItemTypes_UID', 'OriginIndex', '[From]', '[To]', '[Freeze]', '[Connected Item]'] |
|
470 |
values = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?'] |
|
469 |
'SpecialItemTypes_UID', 'OriginIndex', '[From]', '[To]', '[Freeze]', '[Connected Item]', 'Flip']
|
|
470 |
values = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?']
|
|
471 | 471 |
param = [(str(self.uid), str(appDocData.activeDrawing.UID), self.dbUid, self.loc[0], self.loc[1], self.size[0], self.size[1], self.angle, |
472 | 472 |
self.area, str(self.owner) if self.owner else None, \ |
473 | 473 |
str(self.conns[0]) if self.conns else None, \ |
474 | 474 |
self.prop('Supplied By'), \ |
475 | 475 |
str(self.special_item_type) if self.special_item_type else None, \ |
476 | 476 |
self.currentPointModeIndex, \ |
477 |
self.prop('From'),\ |
|
478 |
self.prop('To'),\ |
|
479 |
self.prop('Freeze'),\ |
|
480 |
str(self.prop('Connected Item')) if self.prop('Connected Item') else None)] |
|
477 |
self.prop('From'), \ |
|
478 |
self.prop('To'), \ |
|
479 |
self.prop('Freeze'), \ |
|
480 |
str(self.prop('Connected Item')) if self.prop('Connected Item') else None, \ |
|
481 |
self.flip)] |
|
481 | 482 |
sql = 'insert into Components({}) values({})'.format(','.join(cols), ','.join(values)) |
482 | 483 |
res.append((sql, tuple(param))) |
483 | 484 |
|
내보내기 Unified diff