[TD]fix showSectionEdge preference
This commit is contained in:
@@ -169,7 +169,6 @@ DrawViewPart::DrawViewPart(void) :
|
||||
ADD_PROPERTY_TYPE(IsoCount ,(prefIsoCount()),sgroup,App::Prop_None,"Number of iso parameters lines");
|
||||
|
||||
geometryObject = nullptr;
|
||||
getRunControl();
|
||||
//initialize bbox to non-garbage
|
||||
bbox = Base::BoundBox3d(Base::Vector3d(0.0, 0.0, 0.0), 0.0);
|
||||
}
|
||||
@@ -951,22 +950,11 @@ const std::vector<TechDraw::BaseGeom *> DrawViewPart::getVisibleFaceEdges() con
|
||||
return geometryObject->getVisibleFaceEdges(SmoothVisible.getValue(),SeamVisible.getValue());
|
||||
}
|
||||
|
||||
void DrawViewPart::getRunControl()
|
||||
bool DrawViewPart::handleFaces(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
m_sectionEdges = hGrp->GetBool("ShowSectionEdges", 0l);
|
||||
m_handleFaces = hGrp->GetBool("HandleFaces", 1l);
|
||||
}
|
||||
|
||||
bool DrawViewPart::handleFaces(void)
|
||||
{
|
||||
return m_handleFaces;
|
||||
}
|
||||
|
||||
bool DrawViewPart::showSectionEdges(void)
|
||||
{
|
||||
return m_sectionEdges;
|
||||
return hGrp->GetBool("HandleFaces", 1l);
|
||||
}
|
||||
|
||||
//! remove features that are useless without this DVP
|
||||
|
||||
@@ -162,7 +162,6 @@ public:
|
||||
|
||||
|
||||
bool handleFaces(void);
|
||||
bool showSectionEdges(void);
|
||||
|
||||
bool isUnsetting(void) { return nowUnsetting; }
|
||||
|
||||
@@ -225,8 +224,7 @@ protected:
|
||||
|
||||
Base::Vector3d shapeCentroid;
|
||||
void getRunControl(void);
|
||||
|
||||
bool m_sectionEdges;
|
||||
|
||||
bool m_handleFaces;
|
||||
|
||||
TopoDS_Shape m_saveShape; //TODO: make this a Property. Part::TopoShapeProperty??
|
||||
|
||||
@@ -869,6 +869,14 @@ int DrawViewSection::prefCutSurface(void) const
|
||||
return result;
|
||||
}
|
||||
|
||||
bool DrawViewSection::showSectionEdges(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
return (hGrp->GetBool("ShowSectionEdges", true));
|
||||
}
|
||||
|
||||
|
||||
void DrawViewSection::onDocumentRestored()
|
||||
{
|
||||
// Base::Console().Message("DVS::onDocumentRestored()\n");
|
||||
|
||||
@@ -120,6 +120,8 @@ public:
|
||||
|
||||
std::pair<Base::Vector3d, Base::Vector3d> sectionLineEnds(void);
|
||||
|
||||
bool showSectionEdges(void);
|
||||
|
||||
protected:
|
||||
TopoDS_Compound sectionFaces; //tSectionFaces
|
||||
// std::vector<TopoDS_Wire> sectionFaceWires; //obs??? getSectionFaceWires
|
||||
|
||||
@@ -250,6 +250,9 @@ Then you need to increase the tile limit.</string>
|
||||
<property name="text">
|
||||
<string>Show Section Edges</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ShowSectionEdges</cstring>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user