diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1.ui b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1.ui
index 837e53c4a9..819c9f728c 100644
--- a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1.ui
+++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1.ui
@@ -493,7 +493,7 @@ for ProjectionGroups
Geometric hatch pattern color
-
+
0
0
@@ -548,7 +548,7 @@ for ProjectionGroups
- -
+
-
@@ -569,10 +569,10 @@ for ProjectionGroups
- -
+
-
- Face color
+ Face color (if not transparent)
@@ -589,6 +589,18 @@ for ProjectionGroups
+ -
+
+
+
+ true
+
+
+
+ Detail Highlight
+
+
+
-
@@ -621,6 +633,23 @@ for ProjectionGroups
+ -
+
+
+
+ 0
+ 0
+ 0
+
+
+
+ HighlightColor
+
+
+ /Mod/TechDraw/Decorations
+
+
+
diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1Imp.cpp b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1Imp.cpp
index 3a3bf22c3e..4c3c299027 100644
--- a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1Imp.cpp
+++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw1Imp.cpp
@@ -77,6 +77,7 @@ void DlgPrefsTechDraw1Imp::saveSettings()
pcbVertexColor->onSave();
pcbMarkup->onSave();
+ pcbHighlight->onSave();
}
void DlgPrefsTechDraw1Imp::loadSettings()
@@ -116,6 +117,7 @@ void DlgPrefsTechDraw1Imp::loadSettings()
pcbVertexColor->onRestore();
pcbMarkup->onRestore();
+ pcbHighlight->onRestore();
}
/**
diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui
index 948124695f..0b71c8547a 100644
--- a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui
+++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui
@@ -7,7 +7,7 @@
0
0
448
- 856
+ 891
@@ -379,256 +379,15 @@
-
-
-
-
+
-
+
true
- Line Group Name
-
-
-
- -
-
-
-
- true
-
-
-
- Detail View Outline Shape
-
-
-
- -
-
-
-
- true
-
-
-
- Length of horizontal portion of Balloon leader
-
-
- Ballon Leader Kink Length
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Shape of balloon annotations
-
-
- BalloonShape
-
-
- Mod/TechDraw/Decorations
-
-
-
-
- Circular
-
-
-
- :/icons/circular.svg:/icons/circular.svg
-
-
- -
-
- None
-
-
-
- :/icons/none.svg:/icons/none.svg
-
-
- -
-
- Triangle
-
-
-
- :/icons/triangle.svg:/icons/triangle.svg
-
-
- -
-
- Inspection
-
-
-
- :/icons/inspection.svg:/icons/inspection.svg
-
-
- -
-
- Hexagon
-
-
-
- :/icons/hexagon.svg:/icons/hexagon.svg
-
-
- -
-
- Square
-
-
-
- :/icons/square.svg:/icons/square.svg
-
-
- -
-
- Rectangle
-
-
-
- :/icons/rectangle.svg:/icons/rectangle.svg
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Type for centerlines
-
-
- 2
-
-
- CenterLine
-
-
- /Mod/TechDraw/Decorations
-
-
-
-
- NeverShow
-
-
-
- :/icons/arrownone.svg:/icons/arrownone.svg
-
-
- -
-
- Continuous
-
-
-
- :/icons/continuous-line.svg:/icons/continuous-line.svg
-
-
- -
-
- Dash
-
-
-
- :/icons/dash-line.svg:/icons/dash-line.svg
-
-
- -
-
- Dot
-
-
-
- :/icons/dot-line.svg:/icons/dot-line.svg
-
-
- -
-
- DashDot
-
-
-
- :/icons/dashDot-line.svg:/icons/dashDot-line.svg
-
-
- -
-
- DashDotDot
-
-
-
- :/icons/dashDotDot-line.svg:/icons/dashDotDot-line.svg
-
-
-
-
- -
-
-
-
- true
-
-
-
- Balloon Leader End
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Style for balloon leader line ends
-
-
- BalloonArrow
-
-
- Mod/TechDraw/Decorations
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Default name in LineGroup CSV file
-
-
- FC 0.70mm
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- LineGroup
-
-
- /Mod/TechDraw/Decorations
+ Center Line Style
@@ -720,7 +479,80 @@
- -
+
-
+
+
+
+ true
+
+
+
+ Section Cut Surface
+
+
+
+ -
+
+
+ Default appearance of cut surface in section view
+
+
+ 2
+
+
+ CutSurfaceDisplay
+
+
+ /Mod/TechDraw/Decorations
+
+
-
+
+ Hide
+
+
+ -
+
+ Solid Color
+
+
+ -
+
+ SVG Hatch
+
+
+ -
+
+ PAT Hatch
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Forces last leader line segment to be horizontal
+
+
+ Leader Line Auto Horizontal
+
+
+ true
+
+
+ AutoHorizontal
+
+
+ Mod/TechDraw/LeaderLines
+
+
+
+ -
@@ -745,8 +577,8 @@
- -
-
+
-
+
0
@@ -754,20 +586,165 @@
- Restrict Filled Triangle line end to vertical or horizontal directions
+ Type for centerlines
-
- Balloon Orthogonal Triangle
-
-
- true
+
+ 2
- PyramidOrtho
+ CenterLine
+
+
+ /Mod/TechDraw/Decorations
+
+
-
+
+ NeverShow
+
+
+
+ :/icons/arrownone.svg:/icons/arrownone.svg
+
+
+ -
+
+ Continuous
+
+
+
+ :/icons/continuous-line.svg:/icons/continuous-line.svg
+
+
+ -
+
+ Dash
+
+
+
+ :/icons/dash-line.svg:/icons/dash-line.svg
+
+
+ -
+
+ Dot
+
+
+
+ :/icons/dot-line.svg:/icons/dot-line.svg
+
+
+ -
+
+ DashDot
+
+
+
+ :/icons/dashDot-line.svg:/icons/dashDot-line.svg
+
+
+ -
+
+ DashDotDot
+
+
+
+ :/icons/dashDotDot-line.svg:/icons/dashDotDot-line.svg
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Shape of balloon annotations
+
+
+ BalloonShape
Mod/TechDraw/Decorations
+
-
+
+ Circular
+
+
+
+ :/icons/circular.svg:/icons/circular.svg
+
+
+ -
+
+ None
+
+
+
+ :/icons/none.svg:/icons/none.svg
+
+
+ -
+
+ Triangle
+
+
+
+ :/icons/triangle.svg:/icons/triangle.svg
+
+
+ -
+
+ Inspection
+
+
+
+ :/icons/inspection.svg:/icons/inspection.svg
+
+
+ -
+
+ Hexagon
+
+
+
+ :/icons/hexagon.svg:/icons/hexagon.svg
+
+
+ -
+
+ Square
+
+
+
+ :/icons/square.svg:/icons/square.svg
+
+
+ -
+
+ Rectangle
+
+
+
+ :/icons/rectangle.svg:/icons/rectangle.svg
+
+
+
+
+ -
+
+
+
+ true
+
+
+
+ Balloon Leader End
+
-
@@ -802,7 +779,7 @@
- -
+
-
Qt::Horizontal
@@ -852,30 +829,6 @@
- -
-
-
-
- true
-
-
-
- Balloon Shape
-
-
-
- -
-
-
-
- true
-
-
-
- Center Line Style
-
-
-
-
@@ -888,7 +841,7 @@
- -
+
-
@@ -915,56 +868,8 @@
- -
-
-
-
- true
-
-
-
- Section Cut Surface
-
-
-
- -
-
-
- Default appearance of cut surface in section view
-
-
- 2
-
-
- CutSurfaceDisplay
-
-
- /Mod/TechDraw/Decorations
-
-
-
-
- Hide
-
-
- -
-
- Solid Color
-
-
- -
-
- SVG Hatch
-
-
- -
-
- PAT Hatch
-
-
-
-
- -
-
+
-
+
0
@@ -972,23 +877,118 @@
- Forces last leader line segment to be horizontal
+ Default name in LineGroup CSV file
- Leader Line Auto Horizontal
+ FC 0.70mm
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ LineGroup
+
+
+ /Mod/TechDraw/Decorations
+
+
+
+ -
+
+
+
+ true
+
+
+
+ Detail View Outline Shape
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Style for balloon leader line ends
+
+
+ BalloonArrow
+
+
+ Mod/TechDraw/Decorations
+
+
+
+ -
+
+
+
+ true
+
+
+
+ Length of horizontal portion of Balloon leader
+
+
+ Ballon Leader Kink Length
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Restrict Filled Triangle line end to vertical or horizontal directions
+
+
+ Balloon Orthogonal Triangle
true
- AutoHorizontal
+ PyramidOrtho
- Mod/TechDraw/LeaderLines
+ Mod/TechDraw/Decorations
- -
+
-
+
+
+
+ true
+
+
+
+ Line Group Name
+
+
+
+ -
+
+
+
+ true
+
+
+
+ Balloon Shape
+
+
+
+ -
@@ -1010,6 +1010,88 @@
+ -
+
+
+
+ true
+
+
+
+ Line style of detail highlight on base view
+
+
+ Detail Highlight Style
+
+
+
+ -
+
+
+ 2
+
+
+ HighlightStyle
+
+
+ /Mod/TechDraw/Decorations
+
+
-
+
+ NeverShow
+
+
+
+ :/icons/arrownone.svg:/icons/arrownone.svg
+
+
+ -
+
+ Continuous
+
+
+
+ :/icons/continuous-line.svg:/icons/continuous-line.svg
+
+
+ -
+
+ Dash
+
+
+
+ :/icons/dash-line.svg:/icons/dash-line.svg
+
+
+ -
+
+ Dot
+
+
+
+ :/icons/dot-line.svg:/icons/dot-line.svg
+
+
+ -
+
+ DashDot
+
+
+
+ :/icons/dashDot-line.svg:/icons/dashDot-line.svg
+
+
+ -
+
+ DashDotDot
+
+
+
+ :/icons/dashDotDot-line.svg:/icons/dashDotDot-line.svg
+
+
+
+
diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3Imp.cpp b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3Imp.cpp
index b9e470256d..746941693b 100644
--- a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3Imp.cpp
+++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3Imp.cpp
@@ -81,6 +81,7 @@ void DlgPrefsTechDraw3Imp::saveSettings()
plsb_FontSize->onSave();
sbAltDecimals->onSave();
cbCutSurface->onSave();
+ pcbHighlightStyle->onSave();
}
void DlgPrefsTechDraw3Imp::loadSettings()
@@ -119,6 +120,7 @@ void DlgPrefsTechDraw3Imp::loadSettings()
plsb_FontSize->onRestore();
sbAltDecimals->onRestore();
cbCutSurface->onRestore();
+ pcbHighlightStyle->onRestore();
DrawGuiUtil::loadArrowBox(pcbBalloonArrow);
pcbBalloonArrow->setCurrentIndex(prefBalloonArrow());
diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp
index 997e786853..45eaa27157 100644
--- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp
+++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp
@@ -1016,6 +1016,8 @@ void QGIViewPart::drawHighlight(TechDraw::DrawViewDetail* viewDetail, bool b)
addToGroup(highlight);
highlight->setPos(0.0,0.0); //sb setPos(center.x,center.y)?
highlight->setReference(const_cast(viewDetail->Reference.getValue()));
+ highlight->setStyle((Qt::PenStyle)vp->HighlightLineStyle.getValue());
+ highlight->setColor(vp->HighlightLineColor.getValue().asValue());
Base::Vector3d center = viewDetail->AnchorPoint.getValue() * viewPart->getScale();
diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp
index a8302cea16..a1c35d66cf 100644
--- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp
+++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp
@@ -116,6 +116,11 @@ ViewProviderViewPart::ViewProviderViewPart()
"Set section line color if applicable");
//properties that affect Detail Highlights
+ HighlightLineStyle.setEnums(LineStyleEnums);
+ ADD_PROPERTY_TYPE(HighlightLineStyle, (prefHighlightStyle()), hgroup, App::Prop_None,
+ "Set highlight line style if applicable");
+ ADD_PROPERTY_TYPE(HighlightLineColor, (prefHighlightColor()), hgroup, App::Prop_None,
+ "Set highlight line color if applicable");
ADD_PROPERTY_TYPE(HighlightAdjust,(0.0),hgroup,App::Prop_None,"Adjusts the rotation of the Detail highlight");
ADD_PROPERTY_TYPE(ShowAllEdges ,(false) ,dgroup,App::Prop_None,"Temporarily show invisible lines");
@@ -143,6 +148,8 @@ void ViewProviderViewPart::onChanged(const App::Property* prop)
prop == &(ShowSectionLine) ||
prop == &(SectionLineStyle) ||
prop == &(SectionLineColor) ||
+ prop == &(HighlightLineStyle) ||
+ prop == &(HighlightLineColor) ||
prop == &(HorizCenterLine) ||
prop == &(VertCenterLine) ) {
// redraw QGIVP
@@ -324,3 +331,20 @@ App::Color ViewProviderViewPart::prefSectionColor(void)
return fcColor;
}
+App::Color ViewProviderViewPart::prefHighlightColor(void)
+{
+ Base::Reference hGrp = App::GetApplication().GetUserParameter()
+ .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
+ App::Color fcColor;
+ fcColor.setPackedValue(hGrp->GetUnsigned("HighlightColor", 0x00000000));
+ return fcColor;
+}
+
+int ViewProviderViewPart::prefHighlightStyle(void)
+{
+ Base::Reference hGrp = App::GetApplication().GetUserParameter()
+ .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
+ return hGrp->GetInt("HighlightStyle", 2);
+}
+
+
diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.h b/src/Mod/TechDraw/Gui/ViewProviderViewPart.h
index 01600f456a..9ab6a4501e 100644
--- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.h
+++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.h
@@ -54,6 +54,8 @@ public:
App::PropertyBool ShowSectionLine;
App::PropertyEnumeration SectionLineStyle;
App::PropertyColor SectionLineColor;
+ App::PropertyEnumeration HighlightLineStyle;
+ App::PropertyColor HighlightLineColor;
App::PropertyFloat HighlightAdjust;
App::PropertyBool ShowAllEdges;
@@ -72,6 +74,8 @@ public:
virtual void updateData(const App::Property*);
virtual void handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property * prop);
App::Color prefSectionColor(void);
+ App::Color prefHighlightColor(void);
+ int prefHighlightStyle(void);
virtual std::vector claimChildren(void) const;