개정판 0ec70368
issue #000: fix opc
Change-Id: I1d7a11399b982b51ce279981200abee42e8fac17
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
574 | 574 |
for symbol in symbols: |
575 | 575 |
try: |
576 | 576 |
if symbol.iType == 18 or symbol.iType == 31: # opc will be checked later |
577 |
symbol.clear_attr_and_assoc_item() |
|
577 | 578 |
continue |
578 | 579 |
symbol.connectAttribute(texts) |
579 | 580 |
except Exception as ex: |
... | ... | |
666 | 667 |
if ret: |
667 | 668 |
worker.need_update_texts.append([text, ret]) |
668 | 669 |
|
670 |
for text in targetText: # find line size |
|
671 |
if type(text) is QEngineeringSizeTextItem and not text.owner: |
|
672 |
text.findOwner(lines) |
|
673 |
|
|
669 | 674 |
""" update line type """ |
670 | 675 |
if update_line_type: |
671 | 676 |
worker.display_message.emit('Updating Line Type...') |
DTI_PID/DTI_PID/Shapes/QEngineeringSizeTextItem.py | ||
---|---|---|
20 | 20 |
from EngineeringTextItem import QEngineeringTextItem |
21 | 21 |
from SymbolSvgItem import SymbolSvgItem |
22 | 22 |
from EngineeringReducerItem import QEngineeringReducerItem |
23 |
from EngineeringLineItem import QEngineeringLineItem |
|
23 | 24 |
|
24 | 25 |
class QEngineeringSizeTextItem(QEngineeringTextItem): |
25 | 26 |
|
... | ... | |
85 | 86 |
minDist = length |
86 | 87 |
selected = symbol |
87 | 88 |
|
89 |
elif type(symbol) is QEngineeringLineItem: # check line later |
|
90 |
length = symbol.distanceTo([center.x(), center.y()]) |
|
91 |
if (length < dist) and (minDist is None or length < minDist): |
|
92 |
minDist = length |
|
93 |
selected = symbol |
|
94 |
|
|
88 | 95 |
if selected is not None: |
89 | 96 |
if selected.add_assoc_item(self): |
90 | 97 |
self.owner = selected |
내보내기 Unified diff