From 402fb2fe7742c1fe8849c10bb317febdaeb5d3f2 Mon Sep 17 00:00:00 2001 From: wandererfan Date: Fri, 24 Nov 2023 17:05:20 -0500 Subject: [PATCH] [TD]fix Balloon location --- src/Mod/TechDraw/Gui/QGIViewBalloon.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp b/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp index a0439d6fd6..bb8d6a2b10 100644 --- a/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp @@ -299,7 +299,17 @@ QVariant QGIViewBalloon::itemChange(GraphicsItemChange change, const QVariant& v balloonLabel->setSelected(false); } draw(); + return value; } + + if(change == ItemPositionChange && scene()) { + // QGIVBalloon 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 Balloon will be in the wrong place. + // QGIVDimension behaves the same way. + return QGraphicsItem::itemChange(change, value); + } + return QGIView::itemChange(change, value); }