개정판 1e44f0fe
dev issue #488: note area에 있는 textItem을 noteItem으로 생성하던 소스 수정
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1286 | 1286 |
angle = round(math.radians(textInfo.getAngle())) |
1287 | 1287 |
text = textInfo.getText() |
1288 | 1288 |
|
1289 |
if textInfoMap[0] == 'Note': |
|
1290 |
item = QEngineeringNoteItem() |
|
1291 |
else: |
|
1292 |
item = TextItemFactory.instance().createTextItem(text) |
|
1289 |
item = TextItemFactory.instance().createTextItem(text) |
|
1293 | 1290 |
|
1294 | 1291 |
item.loc = (x, y) |
1295 | 1292 |
item.size = (width, height) |
... | ... | |
1299 | 1296 |
self.addTextItemToScene(item) |
1300 | 1297 |
appDocData.texts.append(item) |
1301 | 1298 |
|
1302 |
## Note Item일 경우 NOTE_DATA_LIST에 추가 |
|
1303 |
if textInfoMap[0] == 'Note': |
|
1304 |
item.saveNoteData() |
|
1305 | 1299 |
except Exception as ex: |
1306 | 1300 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
1307 | 1301 |
self.addMessage.emit(MessageType.Error, message) |
1308 | 1302 |
|
1303 |
|
|
1309 | 1304 |
''' |
1310 | 1305 |
@brief draw unknown items |
1311 | 1306 |
@author humkyung |
... | ... | |
1584 | 1579 |
|
1585 | 1580 |
# Update Scene |
1586 | 1581 |
self.graphicsView.scene.update(self.graphicsView.sceneRect()) |
1582 |
|
|
1587 | 1583 |
except Exception as ex: |
1588 | 1584 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
1589 | 1585 |
self.addMessage.emit(MessageType.Error, message) |
내보내기 Unified diff