개정판 a31687ed
issue #501: remove scene dependency note data
DTI_PID/DTI_PID/Shapes/EngineeringNoteItem.py | ||
---|---|---|
51 | 51 |
else-statement changed, if text starts with new LineNo header, do break |
52 | 52 |
Moved from ResultTreeWidget |
53 | 53 |
2018.05.02 Jeongwoo Add if-statement. Append text to list when Regex start position is not 0 |
54 |
2018.12.10 euisung remove scene dependency |
|
54 | 55 |
''' |
55 | 56 |
def findNoteContents(self, noteNoText): |
56 | 57 |
res = {} |
... | ... | |
59 | 60 |
notesArea = AppDocData.instance().getArea('Note') |
60 | 61 |
if not notesArea: return res |
61 | 62 |
# Get all note contents |
62 |
items = self.scene().items(QRectF(notesArea.x, notesArea.y, notesArea.x + notesArea.width, notesArea.y + notesArea.height))
|
|
63 |
items = [note for note in AppDocData.instance().texts if note.area == 'Note']
|
|
63 | 64 |
items = [item for item in items if type(item) is QEngineeringTextItem] # Filtering QEngineeringTextItem |
64 | 65 |
items.sort(key=lambda item:item.loc[1]) # Compare with loc[1] (Y-Coord) |
65 | 66 |
results = re.findall("\d+", noteNoText) |
내보내기 Unified diff