개정판 2e71e478
기존 Scene에 추가된 TextItem 삭제 시 크기 비교 조건 삭제
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
747 | 747 |
@author Jeongwoo |
748 | 748 |
@date 2018.05.25 |
749 | 749 |
@history 2018.05.29 Jeongwoo Moved from QRecognitionDialog |
750 |
2018.06.05 Jeongwoo Remove Size condition |
|
750 | 751 |
''' |
751 | 752 |
def addTextItemToScene(self, textItem): |
752 | 753 |
textRect = textItem.boundingRectOnScene() |
... | ... | |
755 | 756 |
for item in items: |
756 | 757 |
if issubclass(type(item), QEngineeringTextItem): |
757 | 758 |
itemRect = item.boundingRectOnScene() |
758 |
if itemRect.topLeft() == textRect.topLeft() and itemRect.size() == textRect.size() and item.text() == textItem.text(): # Equal
|
|
759 |
if itemRect.topLeft() == textRect.topLeft() and item.text() == textItem.text(): # Equal |
|
759 | 760 |
item.deleteTextItemFromScene() |
760 | 761 |
textItem.addTextItemToScene(self.graphicsView.scene) |
761 | 762 |
|
내보내기 Unified diff