mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix ToolTip disappeared when resizing the ProfileWindow
When resizing the ProfileWindow and the tooltip was out of boundaries, it was really out of boundaries and there was no way to get it back ( besides re-expanding the window. ) this patch moves the tooltip to (0,0) and don't save that position, so when the window is re-expanded, it will move to the correct location again Fixes #237 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
45f716f857
commit
e91a1fc26c
1 changed files with 3 additions and 2 deletions
|
@ -232,9 +232,7 @@ void ProfileGraphicsView::mouseMoveEvent(QMouseEvent* event)
|
|||
return;
|
||||
|
||||
toolTip->refresh(&gc, mapToScene(event->pos()));
|
||||
|
||||
QPoint toolTipPos = mapFromScene(toolTip->pos());
|
||||
|
||||
scrollViewTo(event->pos());
|
||||
|
||||
if (zoomLevel == 0)
|
||||
|
@ -1569,6 +1567,9 @@ void ToolTipItem::readPos()
|
|||
QPointF value = scene()->views().at(0)->mapToScene(
|
||||
s.value("tooltip_position").toPoint()
|
||||
);
|
||||
if (!scene()->sceneRect().contains(value)){
|
||||
value = QPointF(0,0);
|
||||
}
|
||||
setPos(value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue