diff options
-rw-r--r-- | qt-ui/profile/divetooltipitem.cpp | 4 | ||||
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp index ffe22a820..ca355b710 100644 --- a/qt-ui/profile/divetooltipitem.cpp +++ b/qt-ui/profile/divetooltipitem.cpp @@ -8,6 +8,7 @@ #include <QGraphicsScene> #include <QSettings> #include <QGraphicsView> +#include <QDebug> #define PORT_IN_PROGRESS 1 #ifdef PORT_IN_PROGRESS @@ -223,7 +224,8 @@ void ToolTipItem::setTimeAxis(DiveCartesianAxis* axis) void ToolTipItem::refresh(const QPointF& pos) { clear(); - int time = timeAxis->posAtValue( pos.x() ); + int time = timeAxis->valueAt( pos ); + qDebug() << "time" << time; char buffer[500]; get_plot_details_new(&pInfo, time, buffer, 500); addToolTip(QString(buffer)); diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 400fa59aa..b949cd9f0 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -525,7 +525,7 @@ void ProfileWidget2::scrollViewTo(const QPoint& pos) void ProfileWidget2::mouseMoveEvent(QMouseEvent* event) { - //toolTipItem->refresh(&gc, mapToScene(event->pos())); + toolTipItem->refresh(mapToScene(event->pos())); QPoint toolTipPos = mapFromScene(toolTipItem->pos()); if (zoomLevel == 0) { QGraphicsView::mouseMoveEvent(event); |