[TD] Add Balloon property LineVisible for making the Balloon line visible or hidden.
This commit is contained in:
@@ -113,6 +113,8 @@ DrawViewBalloon::DrawViewBalloon(void)
|
||||
ADD_PROPERTY_TYPE(KinkLength,(prefKinkLength()),"",(App::PropertyType)(App::Prop_None),
|
||||
"Distance from symbol to leader kink");
|
||||
|
||||
ADD_PROPERTY_TYPE(LineVisible,(true),"",(App::PropertyType)(App::Prop_None),"Balloon line visible or hidden");
|
||||
|
||||
SourceView.setScope(App::LinkScope::Global);
|
||||
Rotation.setStatus(App::Property::Hidden,true);
|
||||
Caption.setStatus(App::Property::Hidden,true);
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
App::PropertyDistance OriginY;
|
||||
App::PropertyFloat TextWrapLen;
|
||||
App::PropertyDistance KinkLength;
|
||||
App::PropertyBool LineVisible;
|
||||
|
||||
short mustExecute() const override;
|
||||
|
||||
|
||||
@@ -738,7 +738,7 @@ void QGIViewBalloon::draw()
|
||||
float arAngle = atan2(dirballoonLinesLine.y, dirballoonLinesLine.x) * 180 / M_PI;
|
||||
|
||||
arrow->setPos(arrowTipX, arrowTipY);
|
||||
if ( (endType == ArrowType::FILLED_TRIANGLE) &&
|
||||
if ( (endType == ArrowType::FILLED_TRIANGLE) &&
|
||||
(prefOrthoPyramid()) ) {
|
||||
if (arAngle < 0.0) {
|
||||
arAngle += 360.0;
|
||||
@@ -765,6 +765,11 @@ void QGIViewBalloon::draw()
|
||||
dLinePath.lineTo(arrowTipX - xAdj, arrowTipY - yAdj);
|
||||
balloonLines->setPath(dLinePath);
|
||||
|
||||
if (!balloon->LineVisible.getValue()) {
|
||||
arrow->hide();
|
||||
balloonLines->setPath(QPainterPath());
|
||||
}
|
||||
|
||||
// redraw the Balloon and the parent View
|
||||
if (hasHover && !isSelected()) {
|
||||
setPrettyPre();
|
||||
|
||||
Reference in New Issue
Block a user