mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix segfault on mouseOver at the Profile with an invalid dive selected ( trip )
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
605f42daa4
commit
61373eaccf
4 changed files with 16 additions and 7 deletions
|
@ -214,15 +214,13 @@ void ProfileGraphicsView::plot(struct dive *d)
|
|||
resetTransform();
|
||||
zoomLevel = 0;
|
||||
dive = d;
|
||||
toolTip = 0;
|
||||
}
|
||||
|
||||
if(!isVisible()){
|
||||
if(!isVisible() || !dive){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!dive)
|
||||
return;
|
||||
|
||||
scene()->setSceneRect(0,0, viewport()->width()-50, viewport()->height()-50);
|
||||
|
||||
QSettings s;
|
||||
|
@ -1278,8 +1276,12 @@ void ToolTipItem::collapse()
|
|||
|
||||
void ToolTipItem::expand()
|
||||
{
|
||||
QRectF nextRectangle;
|
||||
|
||||
if (!title){
|
||||
return;
|
||||
}
|
||||
|
||||
QRectF nextRectangle;
|
||||
double width = 0, height = title->boundingRect().height() + SPACING;
|
||||
Q_FOREACH(ToolTip t, toolTips) {
|
||||
if (t.second->boundingRect().width() > width)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue