From 4583dbf3b1e2a10173e0e3a78bd7284accb45e1e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 15 Dec 2016 18:45:10 +0100 Subject: [PATCH] #552 Linked Views : Draw a cross hair marker --- ApplicationCode/UserInterface/RiuViewer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/UserInterface/RiuViewer.cpp b/ApplicationCode/UserInterface/RiuViewer.cpp index 9e6efef490..33b8384ab2 100644 --- a/ApplicationCode/UserInterface/RiuViewer.cpp +++ b/ApplicationCode/UserInterface/RiuViewer.cpp @@ -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()); } } }