개정판 12bc797d
add eq drain auto sort
Change-Id: I2bd2eb30399819902b657b15059ee57b90ec8caa
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
12 | 12 |
from SymbolSvgItem import SymbolSvgItem |
13 | 13 |
from EngineeringTextItem import QEngineeringTextItem |
14 | 14 |
from EngineeringUnknownItem import QEngineeringUnknownItem |
15 |
from EngineeringNozzleItem import QEngineeringNozzleItem |
|
15 | 16 |
|
16 | 17 |
try: |
17 | 18 |
from PyQt5.QtCore import * |
... | ... | |
307 | 308 |
humkyung 2018.05.17 try to connect both symbol and line |
308 | 309 |
humkyung 2018.06.22 order connected objects |
309 | 310 |
''' |
310 |
|
|
311 | 311 |
def find_connected_objects(self, start, to=None, primary=False, include_signal=True): |
312 | 312 |
from EngineeringLineItem import QEngineeringLineItem |
313 | 313 |
from EngineeringEquipmentItem import QEngineeringEquipmentItem |
... | ... | |
1622 | 1622 |
break |
1623 | 1623 |
else: |
1624 | 1624 |
remain_count_past = remain_count |
1625 |
|
|
1626 |
# sort Eq drain |
|
1627 |
for waiting_run_info in [waiting_run_info for waiting_run_info in waiting_run_infos if waiting_run_info.consumed == False and waiting_run_info.not_trim == False]: |
|
1628 |
if len(waiting_run_info.run.items) > 1 and type(waiting_run_info.run.items[-1]) is QEngineeringNozzleItem: |
|
1629 |
if [item for item in waiting_run_info.run.items if type(item) is QEngineeringLineItem and item.is_piping(True)]: |
|
1630 |
waiting_run_info.reverse() |
|
1631 |
|
|
1625 | 1632 |
except Exception as ex: |
1626 | 1633 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
1627 | 1634 |
sys.exc_info()[-1].tb_lineno) |
내보내기 Unified diff