TD: fix QGIViewPart::highlightMoved

This commit is contained in:
wmayer
2023-10-18 23:27:00 +02:00
committed by WandererFan
parent 9012fec857
commit e10d21f4e1

View File

@@ -839,8 +839,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);