Skip to content

Commit

Permalink
[TD]support pyramid arrow in leader
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Dec 31, 2019
1 parent ac680bf commit 3c97d0b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/App/DrawLeaderLine.h
Expand Up @@ -44,7 +44,7 @@ class TechDrawExport DrawLeaderLine : public TechDraw::DrawView

App::PropertyLink LeaderParent;
App::PropertyVectorList WayPoints;
App::PropertyInteger StartSymbol;
App::PropertyInteger StartSymbol; //see Gui/QGIArrow for values
App::PropertyInteger EndSymbol;
App::PropertyBool Scalable;
App::PropertyBool AutoHorizontal;
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/Gui/QGILeaderLine.cpp
Expand Up @@ -492,7 +492,7 @@ void QGILeaderLine::setArrows(std::vector<QPointF> pathPoints)
TechDraw::DrawLeaderLine* featLeader = getFeature();

double baseScale = featLeader->getBaseScale();
QPointF lastOffset = (pathPoints.back() - pathPoints.front()) * baseScale;
QPointF lastOffset = (pathPoints.back() - pathPoints.front());

if (featLeader->StartSymbol.getValue() > -1) {
m_arrow1->setStyle(featLeader->StartSymbol.getValue());
Expand Down
22 changes: 20 additions & 2 deletions src/Mod/TechDraw/Gui/TaskLeaderLine.ui
Expand Up @@ -153,7 +153,7 @@
<item row="1" column="1">
<widget class="QComboBox" name="cboxStartSym">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<item>
<property name="text">
Expand Down Expand Up @@ -214,6 +214,15 @@
<normaloff>:/icons/arrowfork.svg</normaloff>:/icons/arrowfork.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>Pyramid</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/arrowpyramid.svg</normaloff>:/icons/arrowpyramid.svg</iconset>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
Expand Down Expand Up @@ -284,6 +293,15 @@
<normaloff>:/icons/arrowfork.svg</normaloff>:/icons/arrowfork.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>Pyramid</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/arrowpyramid.svg</normaloff>:/icons/arrowpyramid.svg</iconset>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
Expand All @@ -295,7 +313,7 @@
</item>
<item row="3" column="1">
<widget class="Gui::ColorButton" name="cpLineColor">
<property name="color">
<property name="color" stdset="0">
<color>
<red>0</red>
<green>0</green>
Expand Down

0 comments on commit 3c97d0b

Please sign in to comment.