mirror of
https://github.com/wassname/sloth.git
synced 2026-08-17 11:27:04 +08:00
Ensure that mouse position is updated properly()
This commit is contained in:
@@ -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_)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user