mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix crash when moving the mouse over the profile when no dive is shown
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a2f2751792
commit
2b760bdd39
1 changed files with 18 additions and 16 deletions
|
@ -235,6 +235,7 @@ void ToolTipItem::refresh(const QPointF &pos)
|
|||
struct membuffer mb = { 0 };
|
||||
|
||||
entry = get_plot_details_new(&pInfo, time, &mb);
|
||||
if (entry) {
|
||||
tissues->fill();
|
||||
painter->setPen(QColor(0, 0, 0, 0));
|
||||
painter->setBrush(QColor(LIMENADE1));
|
||||
|
@ -252,6 +253,7 @@ void ToolTipItem::refresh(const QPointF &pos)
|
|||
painter->drawLine(i, 60, i, 60 - entry->percentages[i] / 2);
|
||||
}
|
||||
addToolTip(QString::fromUtf8(mb.buffer, mb.len),QIcon(), tissues);
|
||||
}
|
||||
free_buffer(&mb);
|
||||
|
||||
Q_FOREACH (QGraphicsItem *item, scene()->items(pos, Qt::IntersectsItemShape
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue