개정판 d5be9c7f
issue #587: fix text owner and remove attr item
Change-Id: Ib77951a9ab9cbbbec65d517d6a5ca07a7f922f06
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
454 | 454 |
for valve in valves: |
455 | 455 |
valve.connectAttribute(labels, clear=False) |
456 | 456 |
|
457 |
for symbol in symbols: |
|
458 |
for assoc in symbol.associations(): |
|
459 |
if assoc.owner is None: |
|
460 |
assoc.owner = symbol |
|
461 |
|
|
457 | 462 |
""" try to find text item's owner """ |
458 | 463 |
texts = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringReservedWordTextItem] |
459 | 464 |
for text in texts: |
460 | 465 |
text.findOwner(lines) |
461 |
texts = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringSizeTextItem or type(item) is QEngineeringSizeTextItem or type(item) is QEngineeringValveOperCodeTextItem or type(item) is QEngineeringTagNoTextItem]
|
|
466 |
texts = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringSizeTextItem or type(item) is QEngineeringValveOperCodeTextItem or type(item) is QEngineeringTagNoTextItem] |
|
462 | 467 |
for text in texts: |
463 | 468 |
text.findOwner(symbols) |
464 | 469 |
|
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1583 | 1583 |
for connector in match.connectors: |
1584 | 1584 |
if connector.connectedItem is item: connector.connectedItem = None |
1585 | 1585 |
|
1586 |
matches = [_item for _item in self.graphicsView.scene.items() if hasattr(_item, 'remove_assoc_item')] |
|
1587 |
for _item in matches: |
|
1588 |
_item.remove_assoc_item(item) |
|
1586 |
#matches = [_item for _item in self.graphicsView.scene.items() if hasattr(_item, 'remove_assoc_item')]
|
|
1587 |
#for _item in matches:
|
|
1588 |
# _item.remove_assoc_item(item)
|
|
1589 | 1589 |
|
1590 | 1590 |
matches = [_item for _item in self.graphicsView.scene.items() if type(_item) is QEngineeringLineNoTextItem] |
1591 | 1591 |
for match in matches: |
내보내기 Unified diff