[TD]fix dimension location

This commit is contained in:
wandererfan
2023-11-24 09:39:08 -05:00
committed by WandererFan
parent c298594cbe
commit 54da041392

View File

@@ -513,6 +513,14 @@ QVariant QGIViewDimension::itemChange(GraphicsItemChange change, const QVariant&
datumLabel->setSelected(false);
}
draw();
return value;
}
if(change == ItemPositionChange && scene()) {
// QGIVDimension doesn't really change position the way other views do.
// If we call QGIView::itemChange it will set the position to (0,0) instead of
// using the label's position, and the Dimension will be in the wrong place.
// QGIVBalloon behaves the same way.
return QGraphicsItem::itemChange(change, value);
}
return QGIView::itemChange(change, value);
}