개정판 bcc95349
issue #000: add checking process in line no from, to
Change-Id: I51bf8fddda9bbe148ea288f4e1dfc8bf0aee9884
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
156 | 156 |
for lineno in self._lineNos: |
157 | 157 |
_from = lineno.prop('From') |
158 | 158 |
_to = lineno.prop('To') |
159 |
if _from and _to: |
|
159 |
if _from and _to and (type(_from) is QEngineeringLineItem or issubclass(type(_from), SymbolSvgItem)) and (type(_to) is QEngineeringLineItem or issubclass(type(_to), SymbolSvgItem)) :
|
|
160 | 160 |
_from.owner = lineno |
161 | 161 |
_to.owner = lineno |
162 | 162 |
continue |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1557 | 1557 |
self.removedItems['NOTE'].append(str(item.uid)) |
1558 | 1558 |
|
1559 | 1559 |
matches = [_item for _item in self.graphicsView.scene.items() if hasattr(_item, 'connectors') and [connector for connector in _item.connectors if connector.connectedItem is item]] |
1560 |
for matche in matches:
|
|
1561 |
for connector in matche.connectors:
|
|
1560 |
for match in matches: |
|
1561 |
for connector in match.connectors: |
|
1562 | 1562 |
if connector.connectedItem is item: connector.connectedItem = None |
1563 | 1563 |
|
1564 |
matches = [_item for _item in self.graphicsView.scene.items() if type(_item) is QEngineeringLineNoTextItem] |
|
1565 |
for match in matches: |
|
1566 |
if item is match.prop('From'): |
|
1567 |
match.set_property('From', None) |
|
1568 |
elif item is match.prop('To'): |
|
1569 |
match.set_property('To', None) |
|
1564 | 1570 |
|
1565 | 1571 |
""" |
1566 | 1572 |
if hasattr(item, 'connectors'): |
내보내기 Unified diff