개정판 02c5b7e6
issue #000: line no on going
Change-Id: I5509c872d4af6b7bf7f8c7627a2759b0e65aad69
DTI_PID/DTI_PID/Configs.py | ||
---|---|---|
25 | 25 |
res = [] |
26 | 26 |
|
27 | 27 |
_text = text.replace(' ','') |
28 |
|
|
29 |
index = list(set([_text.find('2', i) for i in range(len(_text)) if _text.find('2', i) != -1])) |
|
30 |
if index: |
|
31 |
_text = _text.replace('\n', '') |
|
32 |
|
|
28 | 33 |
for propertyName in configs: |
29 | 34 |
lineProp = appDocData.getLinePropertiesByUID(propertyName) |
30 | 35 |
# Line property인 경우 |
... | ... | |
84 | 89 |
return (False,) |
85 | 90 |
else: |
86 | 91 |
return (False,) |
87 |
return (True, res) if not _text else (False,) |
|
92 |
return (True, res, index) if not _text else (False,)
|
|
88 | 93 |
except Exception as ex: |
89 | 94 |
import sys |
90 | 95 |
from App import App |
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
545 | 545 |
for line in appDocData.lines: |
546 | 546 |
matches = [symbol for symbol in symbols if symbol.is_connectable(line, toler=toler)] |
547 | 547 |
for symbol in matches: |
548 |
detector.connectLineToSymbol(line, symbol, toler=5)
|
|
548 |
detector.connectLineToSymbol(line, symbol, toler=round(toler / 2))
|
|
549 | 549 |
except Exception as ex: |
550 | 550 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[ |
551 | 551 |
-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
... | ... | |
654 | 654 |
for line in appDocData.lines: |
655 | 655 |
matches = [symbol for symbol in symbols if symbol.is_connectable(line, toler=toler)] |
656 | 656 |
for symbol in matches: |
657 |
detector.connectLineToSymbol(line, symbol, toler=5)
|
|
657 |
detector.connectLineToSymbol(line, symbol, toler=round(toler / 2))
|
|
658 | 658 |
except Exception as ex: |
659 | 659 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
660 | 660 |
sys.exc_info()[-1].tb_lineno) |
DTI_PID/DTI_PID/TextItemFactory.py | ||
---|---|---|
71 | 71 |
if result[0]: |
72 | 72 |
item = QEngineeringLineNoTextItem() |
73 | 73 |
text = ''.join(result[1]) |
74 |
if result[2]: |
|
75 |
pass |
|
74 | 76 |
item.setPlainText(text) |
75 | 77 |
|
76 | 78 |
# get color option |
내보내기 Unified diff