mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
#552 Linked Views : Draw a cross hair marker
This commit is contained in:
parent
2b17366310
commit
4583dbf3b1
@ -422,10 +422,13 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
|
||||
if (mainCamera()->project(displayCoord, &screenCoords))
|
||||
{
|
||||
int translatedMousePosY = height() - screenCoords.y();
|
||||
QPoint pos(screenCoords.x(), translatedMousePosY);
|
||||
|
||||
QLabel test("x");
|
||||
test.render(painter, pos);
|
||||
QPoint centerPos(screenCoords.x(), translatedMousePosY);
|
||||
|
||||
// Draw a cross hair marker
|
||||
int markerHalfLength = 6;
|
||||
|
||||
painter->drawLine(centerPos.x(), centerPos.y() - markerHalfLength, centerPos.x(), centerPos.y() + markerHalfLength);
|
||||
painter->drawLine(centerPos.x() - markerHalfLength, centerPos.y(), centerPos.x() + markerHalfLength, centerPos.y());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user