summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profilegraphics.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 6f064ab29..ad412e4b0 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -1197,7 +1197,7 @@ void ToolTipItem::addToolTip(const QString& toolTip, const QIcon& icon)
void ToolTipItem::refresh(struct graphics_context *gc, QPointF pos)
{
clear();
- int time = (pos.x() * gc->maxtime) / scene()->sceneRect().width();
+ int time = (pos.x() * gc->maxtime) / gc->maxx;
char buffer[500];
get_plot_details(gc, time, buffer, 500);
addToolTip(QString(buffer));