diff options
author | Michael Andreen <harv@ruin.nu> | 2013-08-08 12:30:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-08-08 20:00:15 +0200 |
commit | 16addbf373d138819411540a5be49513d58a4038 (patch) | |
tree | 2fbc05f5a1f9e811bf79083f89f33f4ef74a47af /qt-ui/profilegraphics.cpp | |
parent | 89cb73cb2fc99367e061f933b47a5513e5a4740e (diff) | |
download | subsurface-16addbf373d138819411540a5be49513d58a4038.tar.gz |
Use maxx from graphics context for time calculation.
Fixes #128.
Signed-off-by: Michael Andreen <harv@ruin.nu>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 2 |
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)); |