From 4d09bb117a509380789eef1cc85dcc55f4771195 Mon Sep 17 00:00:00 2001 From: wandererfan Date: Wed, 30 Aug 2023 12:52:11 -0400 Subject: [PATCH] [TD]fix #10440 Balloon arrow end point --- src/Mod/TechDraw/Gui/QGIViewBalloon.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp b/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp index cc70155a5e..a0439d6fd6 100644 --- a/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp @@ -587,11 +587,6 @@ void QGIViewBalloon::drawBalloon(bool dragged) if (!refObj) { return; } - // if (!refObj->hasGeometry()) {// nothing to draw yet (restoring) - // balloonLabel->hide(); - // hide(); - // return; - // } auto vp = static_cast(getViewProvider(getViewObject())); if (!vp) { @@ -745,15 +740,16 @@ void QGIViewBalloon::drawBalloon(bool dragged) offsetLR = (lblCenter.x < arrowTipX) ? offsetLR : -offsetLR; + // avoid starting the line inside the balloon + dLineStart.y = lblCenter.y + offsetUD; + dLineStart.x = lblCenter.x + offsetLR; + if (DrawUtil::fpCompare(kinkLength, 0.0) && strcmp(balloonType, "Line")) {//if no kink, then dLine start sb on line from center to arrow - dLineStart = lblCenter; kinkPoint = dLineStart; } else { - dLineStart.y = lblCenter.y + offsetUD; - dLineStart.x = lblCenter.x + offsetLR; kinkLength = (lblCenter.x < arrowTipX) ? kinkLength : -kinkLength; kinkPoint.y = dLineStart.y; kinkPoint.x = dLineStart.x + kinkLength;