aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/profilewidget2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 87339e2f1..b161032d4 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -814,16 +814,16 @@ void ProfileWidget2::scrollViewTo(const QPoint &pos)
void ProfileWidget2::mouseMoveEvent(QMouseEvent *event)
{
- toolTipItem->refresh(mapToScene(event->pos()));
- QPoint toolTipPos = mapFromScene(toolTipItem->pos());
+ QPointF pos = mapToScene(event->pos());
+ toolTipItem->refresh(pos);
if (zoomLevel == 0) {
QGraphicsView::mouseMoveEvent(event);
} else {
+ QPoint toolTipPos = mapFromScene(toolTipItem->pos());
scrollViewTo(event->pos());
toolTipItem->setPos(mapToScene(toolTipPos));
}
- QPointF pos = mapToScene(event->pos());
qreal vValue = profileYAxis->valueAt(pos);
qreal hValue = timeAxis->valueAt(pos);
if (profileYAxis->maximum() >= vValue && profileYAxis->minimum() <= vValue) {