프로젝트

일반

사용자정보

개정판 602fef78

ID602fef782a85a2ef3f9c5aac74d375df4e8141d1
상위 36312e91
하위 34b68a9e

함의성이(가) 5년 이상 전에 추가함

issue #000: fix line place and fix size text item

Change-Id: I8ddfcf305e2a15a7843e8ab93dc6451ab5b26750

차이점 보기:

DTI_PID/DTI_PID/Commands/PlaceLineCommand.py
6 6
import os.path
7 7
import AbstractCommand
8 8
try:
9
    from PyQt5.QtCore import Qt, QPointF, QRectF, pyqtSignal, QT_VERSION_STR
10
    from PyQt5.QtGui import QImage, QPixmap, QPainterPath, QCursor, QTransform
11
    from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene, QFileDialog
9
    from PyQt5.QtCore import *
10
    from PyQt5.QtGui import *
11
    from PyQt5.QtWidgets import *
12 12
except ImportError:
13 13
    try:
14 14
        from PyQt4.QtCore import Qt, QRectF, pyqtSignal, QT_VERSION_STR
......
56 56
        event = param[1]
57 57
        if 'mousePressEvent' == param[0] and event.button() == Qt.LeftButton:
58 58
            if self._polyline is None:
59
                selected = self.imageViewer.scene.itemAt(param[2], QTransform())
59
                selected = [conn for conn in self.imageViewer.scene.items(param[2]) if type(conn) is not QGraphicsTextItem][0]
60 60
                if selected is not None and type(selected) is QEngineeringConnectorItem:
61 61
                    self._polyline = QEngineeringPolylineItem()
62 62
                    self._polyline._vertices.append(selected.center())
DTI_PID/DTI_PID/TextItemFactory.py
302 302

  
303 303
        text = text.replace("'", '"').upper()
304 304

  
305
        first, second = '', ''
305
        first, second = None, None
306 306
        if text.find('"') is not -1:
307 307
            first = text[:text.find('"') + 1]
308 308
            

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)