[TD] add property for section line style
see https://forum.freecadweb.org/viewtopic.php?f=35&t=44320
This commit is contained in:
@@ -56,6 +56,14 @@ using namespace TechDrawGui;
|
||||
|
||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderViewPart, TechDrawGui::ViewProviderDrawingView)
|
||||
|
||||
const char* ViewProviderViewPart::LineStyleEnums[] = { "NoLine",
|
||||
"Continuous",
|
||||
"Dash",
|
||||
"Dot",
|
||||
"DashDot",
|
||||
"DashDotDot",
|
||||
NULL };
|
||||
|
||||
//**************************************************************************
|
||||
// Construction/Destruction
|
||||
|
||||
@@ -100,6 +108,9 @@ ViewProviderViewPart::ViewProviderViewPart()
|
||||
|
||||
//properties that affect Section Line
|
||||
ADD_PROPERTY_TYPE(ShowSectionLine ,(true) ,dgroup,App::Prop_None,"Show/hide section line if applicable");
|
||||
int defLineStyle = hGrp->GetFloat("SectionLine", 2);
|
||||
SectionLineStyle.setEnums(LineStyleEnums);
|
||||
ADD_PROPERTY_TYPE(SectionLineStyle, (defLineStyle), dgroup, App::Prop_None, "Show/hide section line if applicable");
|
||||
|
||||
//properties that affect Detail Highlights
|
||||
ADD_PROPERTY_TYPE(HighlightAdjust,(0.0),hgroup,App::Prop_None,"Adjusts the rotation of the Detail highlight");
|
||||
@@ -127,6 +138,7 @@ void ViewProviderViewPart::onChanged(const App::Property* prop)
|
||||
prop == &(ArcCenterMarks) ||
|
||||
prop == &(CenterScale) ||
|
||||
prop == &(ShowSectionLine) ||
|
||||
prop == &(SectionLineStyle) ||
|
||||
prop == &(HorizCenterLine) ||
|
||||
prop == &(VertCenterLine) ) {
|
||||
// redraw QGIVP
|
||||
|
||||
Reference in New Issue
Block a user