개정판 b9aea7fb
issue #563: separate update flow
Change-Id: Ia27b996d07109077c45d6b23500668f493fb0950
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
964 | 964 |
QApplication.processEvents() |
965 | 965 |
""" make flow mark """ |
966 | 966 |
if update_flow_mark: |
967 |
for line in lines: |
|
968 |
line.flowMark = None |
|
969 |
# line.update_arrow() |
|
970 |
|
|
971 |
configs = docdata.getConfigs('Flow Mark', 'Position') |
|
972 |
position = int(configs[0].value) if 1 == len(configs) else 100 |
|
973 |
configs = docdata.getConfigs('Flow Mark', 'Length') |
|
974 |
length = int(configs[0].value) if 1 == len(configs) else 200 |
|
975 |
|
|
976 |
for line in lines: |
|
977 |
line.update_flow_mark(position, length) |
|
978 |
line.update_arrow() |
|
979 |
# for lineNo in docdata.tracerLineNos: |
|
980 |
# lineNo.update_flow_mark(position, length) |
|
967 |
make_flow_mark(worker, lines) |
|
981 | 968 |
|
982 | 969 |
''' get line no's from/to equipment ''' |
983 | 970 |
for lineNo in lineNos: |
... | ... | |
991 | 978 |
(type1, value, traceback) = sys.exc_info() |
992 | 979 |
sys.excepthook(type1, value, traceback) |
993 | 980 |
|
981 |
def make_flow_mark(worker, lines): |
|
982 |
''' make flow mark ''' |
|
983 |
|
|
984 |
try: |
|
985 |
docdata = AppDocData.instance() |
|
986 |
|
|
987 |
for line in lines: |
|
988 |
line.flowMark = None |
|
989 |
# line.update_arrow() |
|
990 |
|
|
991 |
configs = docdata.getConfigs('Flow Mark', 'Position') |
|
992 |
position = int(configs[0].value) if 1 == len(configs) else 100 |
|
993 |
configs = docdata.getConfigs('Flow Mark', 'Length') |
|
994 |
length = int(configs[0].value) if 1 == len(configs) else 200 |
|
995 |
|
|
996 |
for line in lines: |
|
997 |
line.update_flow_mark(position, length) |
|
998 |
line.update_arrow() |
|
999 |
# for lineNo in docdata.tracerLineNos: |
|
1000 |
# lineNo.update_flow_mark(position, length) |
|
1001 |
|
|
1002 |
except Exception as ex: |
|
1003 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
1004 |
sys.exc_info()[-1].tb_lineno) |
|
1005 |
worker.display_message.emit(message) |
|
994 | 1006 |
|
995 | 1007 |
def sort_run_flow(worker): |
996 | 1008 |
''' sort runs ''' |
997 |
|
|
1009 |
|
|
998 | 1010 |
from EngineeringLineTracerRunItem import QEngineeringLineTracerRunItem |
999 | 1011 |
|
1000 | 1012 |
try: |
내보내기 Unified diff