TD: fix possible dangling pointer in QGIHighlight

This commit is contained in:
wmayer
2022-06-24 17:39:33 +02:00
parent 5234d9bc67
commit 8573d9f8b2
3 changed files with 6 additions and 7 deletions

View File

@@ -959,7 +959,7 @@ void QGIViewPart::drawHighlight(TechDraw::DrawViewDetail* viewDetail, bool b)
QGIHighlight* highlight = new QGIHighlight();
addToGroup(highlight);
highlight->setPos(0.0,0.0); //sb setPos(center.x,center.y)?
highlight->setReference(const_cast<char*>(viewDetail->Reference.getValue()));
highlight->setReference(viewDetail->Reference.getValue());
highlight->setStyle((Qt::PenStyle)vp->HighlightLineStyle.getValue());
highlight->setColor(vp->HighlightLineColor.getValue().asValue<QColor>());