TD: fix QGIViewPart::highlightMoved

This commit is contained in:
wmayer
2023-11-09 00:37:40 -03:00
committed by Adrián Insaurralde Avalos
parent ddc2d98f2c
commit cc41382933
+1 -1
View File
@@ -1023,8 +1023,8 @@ void QGIViewPart::highlightMoved(QGIHighlight* highlight, QPointF newPos)
App::Document* doc = getViewObject()->getDocument();
App::DocumentObject* docObj = doc->getObject(highlightName.c_str());
auto detail = dynamic_cast<DrawViewDetail*>(docObj);
auto oldAnchor = detail->AnchorPoint.getValue();
if (detail) {
auto oldAnchor = detail->AnchorPoint.getValue();
Base::Vector3d delta = Rez::appX(DrawUtil::toVector3d(newPos)) / getViewObject()->getScale();
delta = DrawUtil::invertY(delta);
detail->AnchorPoint.setValue(oldAnchor + delta);