mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: pass dive to ToolTipItem::refresh()
Don't access the global displayed_dive variable in a step to make the profile reentrant. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
193513a61f
commit
54e8fe5d9e
5 changed files with 10 additions and 10 deletions
|
@ -809,7 +809,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
|
|||
else
|
||||
plotPicturesInternal(d, instant);
|
||||
|
||||
toolTipItem->refresh(mapToScene(mapFromGlobal(QCursor::pos())));
|
||||
toolTipItem->refresh(&displayed_dive, mapToScene(mapFromGlobal(QCursor::pos())));
|
||||
#endif
|
||||
|
||||
// OK, how long did this take us? Anything above the second is way too long,
|
||||
|
@ -1025,7 +1025,7 @@ void ProfileWidget2::scrollViewTo(const QPoint &pos)
|
|||
void ProfileWidget2::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
QPointF pos = mapToScene(event->pos());
|
||||
toolTipItem->refresh(mapToScene(mapFromGlobal(QCursor::pos())));
|
||||
toolTipItem->refresh(&displayed_dive, mapToScene(mapFromGlobal(QCursor::pos())));
|
||||
|
||||
if (zoomLevel == 0) {
|
||||
QGraphicsView::mouseMoveEvent(event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue