개정판 910a32a1
fixed issue #601: isClicked 변수를 통해서 왼쪽 마우스 Click 후 드래그일 때만 RubberBandSelectionMode 설정하게 수정
DTI_PID/DTI_PID/Commands/DefaultCommand.py | ||
---|---|---|
28 | 28 |
self._vertices = [] |
29 | 29 |
self.startX = 0 |
30 | 30 |
self.startY = 0 |
31 |
self.isClicked = False |
|
31 | 32 |
|
32 | 33 |
''' |
33 | 34 |
@brief Scroll / Pan / Zoom with Wheel Button |
... | ... | |
53 | 54 |
self.startY = scenePos.y() |
54 | 55 |
self._vertices.clear() |
55 | 56 |
self._vertices.append(param[2]) |
57 |
self.isClicked = True |
|
56 | 58 |
elif 'mouseReleaseEvent' == param[0] and event.button() == Qt.LeftButton: |
57 | 59 |
try: |
58 | 60 |
QGraphicsView.mouseReleaseEvent(self.imageViewer, event) |
... | ... | |
64 | 66 |
width = abs(self._vertices[0].x() - self._vertices[1].x()) |
65 | 67 |
height = abs(self._vertices[0].y() - self._vertices[1].y()) |
66 | 68 |
self.onSuccess.emit(x, y, width, height) |
69 |
self.isClicked = False |
|
67 | 70 |
pass |
68 |
elif 'mouseMoveEvent' == param[0]: |
|
71 |
elif self.isClicked and 'mouseMoveEvent' == param[0]:
|
|
69 | 72 |
endX = scenePos.x() |
70 | 73 |
endY = scenePos.y() |
71 | 74 |
|
내보내기 Unified diff