개정판 8329204f
issue #503: fix vendor package on db action
Change-Id: If7f755122854c6de94c403c58f5fe060223557e4
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
2704 | 2704 |
for component in [component for component in components if |
2705 | 2705 |
component['Name'] == 'VendorPackage' and component['SymbolType_UID'] == -1]: |
2706 | 2706 |
item = QEngineeringVendorItem.from_database(component) |
2707 |
item.transfer.onRemoved.connect(self.itemRemoved) |
|
2708 |
self.graphicsView.scene.addItem(item) |
|
2707 |
if item is not None: |
|
2708 |
item.transfer.onRemoved.connect(self.itemRemoved) |
|
2709 |
self.graphicsView.scene.addItem(item) |
|
2709 | 2710 |
|
2710 | 2711 |
# connect flow item to line |
2711 | 2712 |
for line in lines: |
... | ... | |
2864 | 2865 |
|
2865 | 2866 |
for unknown in root.iter('UNKNOWN'): |
2866 | 2867 |
item = QEngineeringUnknownItem.fromXml(unknown) |
2867 |
item.transfer.onRemoved.connect(self.itemRemoved) |
|
2868 | 2868 |
if item is not None: |
2869 | 2869 |
item.transfer.onRemoved.connect(self.itemRemoved) |
2870 | 2870 |
self.graphicsView.scene.addItem(item) |
DTI_PID/DTI_PID/Scripts/MSSQL/ID2.sql | ||
---|---|---|
1211 | 1211 |
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,4,0,0,0.4,NULL,-1,'Trim Line NO'), |
1212 | 1212 |
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,4,0,0,0.4,NULL,-1,'Unknown'), |
1213 | 1213 |
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,4,0,0,0.4,NULL,-1,'Line'), |
1214 |
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,4,0,0,0.4,NULL,-1,'Note'); |
|
1214 |
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,4,0,0,0.4,NULL,-1,'Note'), |
|
1215 |
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,4,0,0,0.4,NULL,-1,'VendorPackage'); |
|
1215 | 1216 |
|
1216 | 1217 |
|
1217 | 1218 |
CREATE TABLE Drawings ( |
DTI_PID/DTI_PID/Shapes/EngineeringVendorItem.py | ||
---|---|---|
48 | 48 |
|
49 | 49 |
self.transfer = Transfer() |
50 | 50 |
|
51 |
index = 1 |
|
51 | 52 |
for point in self.points: |
52 |
connector = QEngineeringConnectorItem(parent=self) |
|
53 |
connector = QEngineeringConnectorItem(parent=self, index=index)
|
|
53 | 54 |
connector.setPos((point[0], point[1])) |
54 | 55 |
connector.setParentItem(self) |
55 | 56 |
connector.connectPoint = (point[0], point[1]) |
... | ... | |
59 | 60 |
connector.setAcceptTouchEvents(True) |
60 | 61 |
connector.transfer.onPosChanged.connect(self.onConnectorPosChaned) |
61 | 62 |
self.connectors.append(connector) |
63 |
index += 1 |
|
62 | 64 |
|
63 | 65 |
@property |
64 | 66 |
def NameText(self): |
... | ... | |
94 | 96 |
|
95 | 97 |
try: |
96 | 98 |
uidNode = component['UID'] |
97 |
uid = uidNode.text if uidNode is not None else uuid.uuid4() # generate UUID
|
|
99 |
uid = uidNode if uidNode is not None else uuid.uuid4() # generate UUID |
|
98 | 100 |
|
99 | 101 |
app_doc_data = AppDocData.instance() |
100 | 102 |
connectors = app_doc_data.get_component_connectors(str(uid)) |
... | ... | |
158 | 160 |
for point in self.points: |
159 | 161 |
params.append(( # str(uuid.uuid4()), |
160 | 162 |
str(self.uid), index, point[0], point[1])) |
163 |
index += 1 |
|
161 | 164 |
sql = 'insert into Points({}) values({})'.format(','.join(cols), ','.join(values)) |
162 | 165 |
resLater.append((sql, tuple(params))) |
163 | 166 |
# up to here |
내보내기 Unified diff