개정판 f9068b2a
issue #641: fix scene
Change-Id: I96bbb4df843dad5bed89cdc70b7cd36e65b484cf
DTI_PID/DTI_PID/Commands/ZoomCommand.py | ||
---|---|---|
58 | 58 |
zoomArea = QRectF(QPointF(scenePos1.x(), scenePos1.y()), QPointF(scenePos2.x(), scenePos2.y())) |
59 | 59 |
viewBBox = self.imageViewer.zoomStack[-1] if len(self.imageViewer.zoomStack) else self.imageViewer.sceneRect() |
60 | 60 |
selectionBBox = zoomArea.intersected(viewBBox) |
61 |
self.imageViewer.scene.setSelectionArea(QPainterPath()) # Clear current selection area. |
|
61 |
self.imageViewer.scene().setSelectionArea(QPainterPath()) # Clear current selection area.
|
|
62 | 62 |
if selectionBBox.isValid() and (selectionBBox != viewBBox): |
63 | 63 |
self.imageViewer.zoomStack.append(selectionBBox) |
64 | 64 |
self.imageViewer.updateViewer() |
65 | 65 |
else: |
66 | 66 |
#print("zoom out") |
67 |
self.imageViewer.scene.setSelectionArea(QPainterPath()) # Clear current selection area. |
|
67 |
self.imageViewer.scene().setSelectionArea(QPainterPath()) # Clear current selection area.
|
|
68 | 68 |
if len(self.imageViewer.zoomStack): |
69 | 69 |
self.imageViewer.zoomStack.pop() |
70 | 70 |
self.imageViewer.updateViewer() |
내보내기 Unified diff