개정판 b78d1df0
issue #000: fix error item
Change-Id: Ibd32b4b6dce6868d34288dc135c668c926a95009
DTI_PID/DTI_PID/Shapes/EngineeringConnectorItem.py | ||
---|---|---|
604 | 604 |
path = app_doc_data.getErrorItemSvgPath() |
605 | 605 |
|
606 | 606 |
error = SymbolSvgItem.createItem('Error', None, path) |
607 |
error.setPosition(self.center())
|
|
607 |
error.setPosition(list(self.center()))
|
|
608 | 608 |
error.parent = self.parentItem() |
609 | 609 |
error.msg = "connection point's position error" |
610 | 610 |
error.setToolTip(error.msg) |
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
1195 | 1195 |
# check if there is not connected connector |
1196 | 1196 |
if connector.connectedItem is None: |
1197 | 1197 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1198 |
error.setPosition(connector.center())
|
|
1198 |
error.setPosition(list(connector.center()))
|
|
1199 | 1199 |
error.parent = self |
1200 | 1200 |
error.msg = _translate('disconnected', 'disconnected') |
1201 | 1201 |
error.setToolTip(error.msg) |
... | ... | |
1210 | 1210 |
# check if two items are connected each other |
1211 | 1211 |
if not matches: |
1212 | 1212 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1213 |
error.setPosition(connector.center())
|
|
1213 |
error.setPosition(list(connector.center()))
|
|
1214 | 1214 |
error.parent = self |
1215 | 1215 |
error.msg = _translate('disconnected from opposite side', 'disconnected from opposite side') |
1216 | 1216 |
error.setToolTip(error.msg) |
... | ... | |
1220 | 1220 |
# check connection position |
1221 | 1221 |
elif not self.isOverlap(connector.sceneBoundingRect(), matches[0].sceneBoundingRect()): |
1222 | 1222 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1223 |
error.setPosition(connector.center())
|
|
1223 |
error.setPosition(list(connector.center()))
|
|
1224 | 1224 |
error.parent = self |
1225 | 1225 |
error.msg = _translate('mismatched position', 'mismatched position') |
1226 | 1226 |
error.setToolTip(error.msg) |
... | ... | |
1242 | 1242 |
1]) == connector.connectedItem.line().p1() else 2 |
1243 | 1243 |
else: |
1244 | 1244 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1245 |
error.setPosition(connector.center())
|
|
1245 |
error.setPosition(list(connector.center()))
|
|
1246 | 1246 |
error.parent = self |
1247 | 1247 |
error.msg = _translate('disconnected from opposite side', 'disconnected from opposite side') |
1248 | 1248 |
error.setToolTip(error.msg) |
... | ... | |
1252 | 1252 |
|
1253 | 1253 |
if indices[0] == indices[1]: |
1254 | 1254 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1255 |
error.setPosition(connector.center())
|
|
1255 |
error.setPosition(list(connector.center()))
|
|
1256 | 1256 |
error.parent = self |
1257 | 1257 |
error.msg = _translate('flow direction error', 'flow direction error') |
1258 | 1258 |
error.setToolTip(error.msg) |
... | ... | |
1262 | 1262 |
|
1263 | 1263 |
if self.lineType != connector.connectedItem.lineType: |
1264 | 1264 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1265 |
error.setPosition(connector.center())
|
|
1265 |
error.setPosition(list(connector.center()))
|
|
1266 | 1266 |
error.parent = self |
1267 | 1267 |
error.msg = _translate('line type error', 'line type error') |
1268 | 1268 |
error.setToolTip(error.msg) |
... | ... | |
1279 | 1279 |
|
1280 | 1280 |
if line.distanceTo(center) > toler * 2: |
1281 | 1281 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
1282 |
error.setPosition(connector.center())
|
|
1282 |
error.setPosition(list(connector.center()))
|
|
1283 | 1283 |
error.parent = self |
1284 | 1284 |
error.msg = _translate('Line Position error', 'Line Position error') |
1285 | 1285 |
error.setToolTip(error.msg) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
297 | 297 |
# check if two items are connected each other |
298 | 298 |
if not matches: |
299 | 299 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
300 |
error.setPosition(connector.center())
|
|
300 |
error.setPosition(list(connector.center()))
|
|
301 | 301 |
error.parent = self |
302 | 302 |
error.msg = self.tr('disconnected from opposite side') |
303 | 303 |
error.setToolTip(error.msg) |
... | ... | |
324 | 324 |
if ((self.conn_type[index] == 'Primary' or self.conn_type[index] == 'Secondary') and not item.is_piping()) or \ |
325 | 325 |
(not (self.conn_type[index] == 'Primary' or self.conn_type[index] == 'Secondary') and item.is_piping(True)): |
326 | 326 |
error = SymbolSvgItem.createItem('Error', None, dataPath) |
327 |
error.setPosition(self.connectors[index].center())
|
|
327 |
error.setPosition(list(self.connectors[index].center()))
|
|
328 | 328 |
error.parent = self |
329 | 329 |
error.msg = self.tr('line type error') |
330 | 330 |
error.setToolTip(error.msg) |
내보내기 Unified diff