From 21ed18816acab65e754144239f5f320cdf8c9c21 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 25 Feb 2014 13:57:05 -0800 Subject: [PATCH] New profile: fix tooltip display for events We need to use the transform() of the view, not the tooltip. Suggested-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/divetooltipitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp index b2b72ed58..7171a8a2c 100644 --- a/qt-ui/profile/divetooltipitem.cpp +++ b/qt-ui/profile/divetooltipitem.cpp @@ -244,7 +244,7 @@ void ToolTipItem::refresh(const QPointF& pos) addToolTip(QString::fromUtf8(mb.buffer, mb.len)); free_buffer(&mb); - QList items = scene()->items(pos, Qt::IntersectsItemShape, Qt::DescendingOrder, transform()); + QList items = scene()->items(pos, Qt::IntersectsItemShape, Qt::DescendingOrder, scene()->views().first()->transform()); Q_FOREACH(QGraphicsItem *item, items) { if (!item->toolTip().isEmpty()) addToolTip(item->toolTip());