개정판 9667a2fd
improve pen operation
Change-Id: I63f71ae389ce240a41fb88a7e1d1f5b91b78b826
DTI_PID/DTI_PID/Commands/DefaultCommand.py | ||
---|---|---|
59 | 59 |
if 'mousePressEvent' == param[0] and (event.button() == Qt.MiddleButton or |
60 | 60 |
event.button() == Qt.RightButton): |
61 | 61 |
self.imageViewer.setDragMode(QGraphicsView.ScrollHandDrag) |
62 |
self.imageViewer.setInteractive(False) |
|
63 |
#[item.setEnabled(False) for item in self.imageViewer.scene().items() if issubclass(type(item), SymbolSvgItem)] |
|
64 |
#[item.setAcceptHoverEvents(False) for item in self.imageViewer.scene().items() if issubclass(type(item), SymbolSvgItem)] |
|
62 | 65 |
QGraphicsView.mousePressEvent(self.imageViewer, QMouseEvent(QEvent.MouseButtonPress, event.pos(), Qt.LeftButton, event.buttons(), Qt.NoModifier)) |
63 | 66 |
elif 'mouseReleaseEvent' == param[0] and (event.button() == Qt.MiddleButton or |
64 | 67 |
event.button() == Qt.RightButton): |
65 | 68 |
try: |
66 | 69 |
self.imageViewer.setDragMode(QGraphicsView.NoDrag) |
70 |
self.imageViewer.setInteractive(True) |
|
67 | 71 |
finally: |
68 | 72 |
QGraphicsView.mouseReleaseEvent(self.imageViewer, QMouseEvent(QEvent.MouseButtonRelease, event.pos(), Qt.LeftButton, event.buttons(), Qt.NoModifier)) |
69 | 73 |
pass |
내보내기 Unified diff