[PATCH] Use maxx from graphics context for time calculation.

Michael Andreen harv at ruin.nu
Thu Aug 8 03:30:56 UTC 2013


Fixes #128.

Signed-off-by: Michael Andreen <harv at ruin.nu>
---
 qt-ui/profilegraphics.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 6f064ab..ad412e4 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));
-- 
1.8.1.5




More information about the subsurface mailing list