diff options
Diffstat (limited to 'qt-ui/profile/divetooltipitem.cpp')
-rw-r--r-- | qt-ui/profile/divetooltipitem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp index dbef866c5..ea3a74901 100644 --- a/qt-ui/profile/divetooltipitem.cpp +++ b/qt-ui/profile/divetooltipitem.cpp @@ -234,14 +234,16 @@ void ToolTipItem::refresh(const QPointF &pos) struct plot_data *entry; static QPixmap tissues(16,60); static QPainter painter(&tissues); + static struct membuffer mb = { 0 }; + int time = timeAxis->valueAt(pos); if (time == lastTime) return; lastTime = time; clear(); - struct membuffer mb = { 0 }; + mb.len = 0; entry = get_plot_details_new(&pInfo, time, &mb); if (entry) { tissues.fill(); @@ -262,7 +264,6 @@ void ToolTipItem::refresh(const QPointF &pos) } addToolTip(QString::fromUtf8(mb.buffer, mb.len),QIcon(), tissues); } - free_buffer(&mb); Q_FOREACH (QGraphicsItem *item, scene()->items(pos, Qt::IntersectsItemBoundingRect ,Qt::DescendingOrder, scene()->views().first()->transform())) { |