From e5d4463c3248ebf88375e1846d9af7000090c835 Mon Sep 17 00:00:00 2001 From: Tats Date: Fri, 17 Jul 2015 16:28:27 -0600 Subject: [PATCH] Reintegrated highlighting of selected vertex. --- Mapper.cpp | 2 +- MapperGLCanvas.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Mapper.cpp b/Mapper.cpp index 2653c21..778767c 100644 --- a/Mapper.cpp +++ b/Mapper.cpp @@ -30,7 +30,7 @@ MShape::ptr ShapeControlPainter::getShape() const { return _shapeItem->getShape( void ShapeControlPainter::paint(QPainter *painter, const QList& selectedVertices) { _paintShape(painter); - _paintVertices(painter); + _paintVertices(painter, selectedVertices); } void ShapeControlPainter::_paintVertices(QPainter *painter, const QList& selectedVertices) diff --git a/MapperGLCanvas.cpp b/MapperGLCanvas.cpp index 14eaa15..a559013 100644 --- a/MapperGLCanvas.cpp +++ b/MapperGLCanvas.cpp @@ -80,9 +80,15 @@ void MapperGLCanvas::drawForeground(QPainter *painter , const QRectF &rect) uid mid = _mainWindow->getCurrentMappingId(); if (mid != NULL_UID) { + // Use current shape graphics item to draw controls. ShapeGraphicsItem* item = getCurrentShapeGraphicsItem(); if (item) - item->getControlPainter()->paint(painter); + { + QList selected; + if (hasActiveVertex()) + selected.push_back(getActiveVertexIndex()); + item->getControlPainter()->paint(painter, selected); + } } } }