mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
89cb73cb2f
commit
16addbf373
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue