개정판 3341afa0
issue #506: note delete bug fixed
DTI_PID/DTI_PID/ItemTreeWidget.py | ||
---|---|---|
66 | 66 |
self.imageViewer.mainWindow.removedItems['INST'].append(str(data.uid)) |
67 | 67 |
elif type(data) is QEngineeringEquipmentItem: |
68 | 68 |
self.imageViewer.mainWindow.removedItems['EQUIP'].append(str(data.uid)) |
69 |
elif type(data) is QEngineeringNoteItem: |
|
70 |
self.imageViewer.mainWindow.removedItems['NOTE'].append(str(data.uid)) |
|
69 | 71 |
|
70 | 72 |
item.parent().removeChild(item) |
71 | 73 |
event.accept() |
... | ... | |
470 | 472 |
data = foundItem.data(0, self.TREE_DATA_ROLE) |
471 | 473 |
if data is not None and data is item: |
472 | 474 |
return foundItem |
475 |
elif type(item) is QEngineeringNoteItem: |
|
476 |
foundItems = self.findItems(item.text() , Qt.MatchExactly|Qt.MatchRecursive, 0) |
|
477 |
for foundItem in foundItems: |
|
478 |
data = foundItem.data(0, self.TREE_DATA_ROLE) |
|
479 |
if data is not None and data is item: |
|
480 |
return foundItem |
|
473 | 481 |
|
474 | 482 |
return None |
475 | 483 |
|
DTI_PID/DTI_PID/tesseract_ocr_module.py | ||
---|---|---|
71 | 71 |
""" |
72 | 72 |
def getTextInfo(img, startPoint, angle = 0, language='eng', flag = FLAG_IMAGE_TO_BOXES, conf = None): |
73 | 73 |
try: |
74 |
if img.shape is (0,0):
|
|
74 |
if img.shape == (0,0):
|
|
75 | 75 |
return |
76 | 76 |
os.environ['TESSDATA_PREFIX'] = os.path.join(tesseract_path, 'tessdata') |
77 | 77 |
textInfoList = [] |
내보내기 Unified diff