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>
This commit is contained in:
Michael Andreen 2013-08-08 12:30:56 +02:00 committed by Dirk Hohndel
parent 89cb73cb2f
commit 16addbf373

View file

@ -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));