Ensure that mouse position is updated properly()

This commit is contained in:
Mika Fischer
2011-06-30 15:42:41 +02:00
parent 8292b5b93f
commit 983044c2a7
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ class AnnotationScene(QGraphicsScene):
def mouseMoveEvent(self, event):
sp = event.scenePos()
self.mousePositionChanged.emit(sp.x(), sp.y())
LOG.debug("mouseMoveEvent %s %s" % (self.sceneRect().contains(event.scenePos()), event.scenePos()))
#LOG.debug("mouseMoveEvent %s %s" % (self.sceneRect().contains(event.scenePos()), event.scenePos()))
if self.inserter_ is not None:
# insert mode
self.inserter_.mouseMoveEvent(event, self.image_item_)
+1
View File
@@ -18,6 +18,7 @@ class GraphicsView(QGraphicsView):
QGraphicsView.__init__(self, parent)
self.setDragMode(QGraphicsView.RubberBandDrag)
#self.setDragMode(QGraphicsView.ScrollHandDrag)
self.setMouseTracking(True)
self.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform | QPainter.TextAntialiasing);
self.setStyleSheet("QFrame { border: 3px solid black }");
self.active_ = False