[TechDraw] Simplify retrievement of user preferences
for all TechDraw files
This commit is contained in:
committed by
WandererFan
parent
50c2b7e9d8
commit
5d05acc87e
@@ -96,9 +96,7 @@ App::Color LineFormat::getDefEdgeColor()
|
||||
|
||||
int LineFormat::getDefEdgeStyle()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
int style = hGrp->GetInt("CosmoCLStyle", 2); //dashed
|
||||
int style = Preferences::getPreferenceGroup("Decorations")->GetInt("CosmoCLStyle", 2); //dashed
|
||||
return style;
|
||||
}
|
||||
|
||||
@@ -507,8 +505,6 @@ PyObject* GeomFormat::getPyObject()
|
||||
|
||||
bool CosmeticVertex::restoreCosmetic()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
return hGrp->GetBool("restoreCosmetic", true);
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("restoreCosmetic", true);
|
||||
}
|
||||
|
||||
|
||||
@@ -594,10 +594,8 @@ std::string DrawGeomHatch::prefGeomHatchFile()
|
||||
|
||||
std::string DrawGeomHatch::prefGeomHatchName()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/PAT");
|
||||
std::string defaultNamePattern = "Diamond";
|
||||
std::string result = hGrp->GetASCII("NamePattern", defaultNamePattern.c_str());
|
||||
std::string result = Preferences::getPreferenceGroup("PAT")->GetASCII("NamePattern", defaultNamePattern.c_str());
|
||||
if (result.empty()) {
|
||||
return defaultNamePattern;
|
||||
}
|
||||
@@ -606,10 +604,8 @@ std::string DrawGeomHatch::prefGeomHatchName()
|
||||
|
||||
App::Color DrawGeomHatch::prefGeomHatchColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("GeomHatch", 0x00FF0000));
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("GeomHatch", 0x00FF0000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
|
||||
@@ -223,10 +223,8 @@ std::string DrawHatch::prefSvgHatch(void)
|
||||
|
||||
App::Color DrawHatch::prefSvgHatchColor(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("Hatch", 0x00FF0000));
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("Hatch", 0x00FF0000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Parameter.h>
|
||||
|
||||
@@ -30,6 +29,7 @@
|
||||
#include "DrawLeaderLinePy.h" // generated from DrawLeaderLinePy.xml
|
||||
#include "ArrowPropEnum.h"
|
||||
#include "DrawView.h"
|
||||
#include "Preferences.h"
|
||||
|
||||
|
||||
using namespace TechDraw;
|
||||
@@ -247,9 +247,7 @@ Base::Vector3d DrawLeaderLine::getTailPoint() const
|
||||
|
||||
bool DrawLeaderLine::getDefAuto() const
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw/LeaderLine");
|
||||
return hGrp->GetBool("AutoHorizontal", true);
|
||||
return Preferences::getPreferenceGroup("LeaderLine")->GetBool("AutoHorizontal", true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -75,12 +75,7 @@ DrawPage::DrawPage(void)
|
||||
ProjectionType.setEnums(ProjectionTypeEnums);
|
||||
ADD_PROPERTY(ProjectionType, ((long)Preferences::projectionAngle()));
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
double defScale = hGrp->GetFloat("DefaultScale", 1.0);
|
||||
double defScale = Preferences::getPreferenceGroup("General")->GetFloat("DefaultScale", 1.0);
|
||||
ADD_PROPERTY_TYPE(Scale, (defScale), group, (App::PropertyType)(App::Prop_None),
|
||||
"Scale factor for this Page");
|
||||
|
||||
@@ -464,23 +459,13 @@ bool DrawPage::hasObject(App::DocumentObject* obj)
|
||||
//allow/prevent drawing updates for all Pages
|
||||
bool DrawPage::GlobalUpdateDrawings(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
return hGrp->GetBool("GlobalUpdateDrawings", true);
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("GlobalUpdateDrawings", true);
|
||||
}
|
||||
|
||||
//allow/prevent a single page to update despite GlobalUpdateDrawings setting
|
||||
bool DrawPage::AllowPageOverride(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
return hGrp->GetBool("AllowPageOverride", true);
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("AllowPageOverride", true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,12 +61,7 @@ DrawProjGroup::DrawProjGroup()
|
||||
static const char* group = "Base";
|
||||
static const char* agroup = "Distribute";
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
bool autoDist = hGrp->GetBool("AutoDist", true);
|
||||
bool autoDist = Preferences::getPreferenceGroup("General")->GetBool("AutoDist", true);
|
||||
|
||||
ADD_PROPERTY_TYPE(Source, (nullptr), group, App::Prop_None, "Shape to view");
|
||||
Source.setScope(App::LinkScope::Global);
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#include <gp_Vec.hxx>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include <Base/Parameter.h>
|
||||
@@ -68,6 +67,7 @@
|
||||
#include "DrawUtil.h"
|
||||
#include "GeometryObject.h"
|
||||
#include "LineGroup.h"
|
||||
#include "Preferences.h"
|
||||
|
||||
|
||||
using namespace TechDraw;
|
||||
@@ -979,12 +979,7 @@ bool DrawUtil::isCrazy(TopoDS_Edge e)
|
||||
return true;
|
||||
}
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/debug");
|
||||
bool crazyOK = hGrp->GetBool("allowCrazyEdge", false);
|
||||
bool crazyOK = Preferences::getPreferenceGroup("debug")->GetBool("allowCrazyEdge", false);
|
||||
if (crazyOK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -571,17 +571,13 @@ void DrawView::setScaleAttribute()
|
||||
|
||||
int DrawView::prefScaleType()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
int result = hGrp->GetInt("DefaultScaleType", 0);
|
||||
int result = Preferences::getPreferenceGroup("General")->GetInt("DefaultScaleType", 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
double DrawView::prefScale()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
double result = hGrp->GetFloat("DefaultViewScale", 1.0);
|
||||
double result = Preferences::getPreferenceGroup("General")->GetFloat("DefaultViewScale", 1.0);
|
||||
if (ScaleType.isValue("Page")) {
|
||||
auto page = findParentPage();
|
||||
if (page) {
|
||||
|
||||
@@ -450,13 +450,7 @@ double DrawViewDetail::getFudgeRadius() { return Radius.getValue() * m_fudge; }
|
||||
|
||||
bool DrawViewDetail::debugDetail() const
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/debug");
|
||||
|
||||
return hGrp->GetBool("debugDetail", false);
|
||||
return Preferences::getPreferenceGroup("debug")->GetBool("debugDetail", false);
|
||||
}
|
||||
|
||||
void DrawViewDetail::unsetupObject()
|
||||
|
||||
@@ -1817,12 +1817,7 @@ bool DrawViewDimension::hasOverUnderTolerance() const
|
||||
|
||||
bool DrawViewDimension::showUnits() const
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/Dimensions");
|
||||
return hGrp->GetBool("ShowUnits", false);
|
||||
return Preferences::getPreferenceGroup("Dimensions")->GetBool("ShowUnits", false);
|
||||
}
|
||||
|
||||
bool DrawViewDimension::useDecimals() const { return Preferences::useGlobalDecimals(); }
|
||||
@@ -1833,12 +1828,7 @@ std::string DrawViewDimension::getPrefixForDimType() const
|
||||
return "R";
|
||||
}
|
||||
else if (Type.isValue("Diameter")) {
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/Dimensions");
|
||||
return std::string(hGrp->GetASCII("DiameterSymbol", "\xe2\x8c\x80"));// Diameter symbol
|
||||
return std::string(Preferences::getPreferenceGroup("Dimensions")->GetASCII("DiameterSymbol", "\xe2\x8c\x80"));// Diameter symbol
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
#include <sstream>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <Base/BoundBox.h>
|
||||
#include <Base/Console.h>
|
||||
@@ -77,6 +76,7 @@
|
||||
#include "Geometry.h"
|
||||
#include "GeometryObject.h"
|
||||
#include "ShapeExtractor.h"
|
||||
#include "Preferences.h"
|
||||
|
||||
|
||||
using namespace TechDraw;
|
||||
@@ -101,12 +101,7 @@ DrawViewPart::DrawViewPart(void)
|
||||
|
||||
CosmeticExtension::initExtension(this);
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
double defDist = hGrp->GetFloat("FocusDistance", 100.0);
|
||||
double defDist = Preferences::getPreferenceGroup("General")->GetFloat("FocusDistance", 100.0);
|
||||
|
||||
//properties that affect Geometry
|
||||
ADD_PROPERTY_TYPE(Source, (nullptr), group, App::Prop_None, "3D Shape to view");
|
||||
@@ -124,7 +119,7 @@ DrawViewPart::DrawViewPart(void)
|
||||
ADD_PROPERTY_TYPE(Focus, (defDist), group, App::Prop_None, "Perspective view focus distance");
|
||||
|
||||
//properties that control HLR algo
|
||||
bool coarseView = hGrp->GetBool("CoarseView", false);
|
||||
bool coarseView = Preferences::getPreferenceGroup("General")->GetBool("CoarseView", false);
|
||||
ADD_PROPERTY_TYPE(CoarseView, (coarseView), sgroup, App::Prop_None, "Coarse View on/off");
|
||||
ADD_PROPERTY_TYPE(SmoothVisible, (prefSmoothViz()), sgroup, App::Prop_None,
|
||||
"Show Visible Smooth lines");
|
||||
@@ -1220,22 +1215,12 @@ const BaseGeomPtrVector DrawViewPart::getVisibleFaceEdges() const
|
||||
|
||||
bool DrawViewPart::handleFaces()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
return hGrp->GetBool("HandleFaces", 1l);
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("HandleFaces", 1l);
|
||||
}
|
||||
|
||||
bool DrawViewPart::newFaceFinder(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
return hGrp->GetBool("NewFaceFinder", 0l);
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("NewFaceFinder", 0l);
|
||||
}
|
||||
|
||||
//! remove features that are useless without this DVP
|
||||
@@ -1674,92 +1659,47 @@ void DrawViewPart::handleChangedPropertyName(Base::XMLReader& reader, const char
|
||||
|
||||
bool DrawViewPart::prefHardViz()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("HardViz", true);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("HardViz", true);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefSeamViz()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("SeamViz", true);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("SeamViz", true);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefSmoothViz()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("SmoothViz", true);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("SmoothViz", true);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefIsoViz()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("IsoViz", false);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("IsoViz", false);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefHardHid()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("HardHid", false);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("HardHid", false);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefSeamHid()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("SeamHid", false);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("SeamHid", false);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefSmoothHid()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("SmoothHid", false);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("SmoothHid", false);
|
||||
}
|
||||
|
||||
bool DrawViewPart::prefIsoHid()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("IsoHid", false);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("IsoHid", false);
|
||||
}
|
||||
|
||||
int DrawViewPart::prefIsoCount()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/HLR");
|
||||
return hGrp->GetBool("IsoCount", 0);
|
||||
return Preferences::getPreferenceGroup("HLR")->GetBool("IsoCount", 0);
|
||||
}
|
||||
|
||||
// Python Drawing feature ---------------------------------------------------------
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
#include <QtConcurrentRun>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <Base/BoundBox.h>
|
||||
#include <Base/Console.h>
|
||||
@@ -90,6 +89,7 @@
|
||||
#include "DrawUtil.h"
|
||||
#include "EdgeWalker.h"
|
||||
#include "GeometryObject.h"
|
||||
#include "Preferences.h"
|
||||
|
||||
#include "DrawViewSection.h"
|
||||
|
||||
@@ -1174,47 +1174,25 @@ void DrawViewSection::replacePatIncluded(std::string newPatFile)
|
||||
void DrawViewSection::getParameters()
|
||||
{
|
||||
// Base::Console().Message("DVS::getParameters()\n");
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
|
||||
bool fuseFirst = hGrp->GetBool("SectionFuseFirst", false);
|
||||
bool fuseFirst = Preferences::getPreferenceGroup("General")->GetBool("SectionFuseFirst", false);
|
||||
FuseBeforeCut.setValue(fuseFirst);
|
||||
}
|
||||
|
||||
bool DrawViewSection::debugSection(void) const
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/debug");
|
||||
|
||||
return hGrp->GetBool("debugSection", false);
|
||||
return Preferences::getPreferenceGroup("debug")->GetBool("debugSection", false);
|
||||
}
|
||||
|
||||
int DrawViewSection::prefCutSurface(void) const
|
||||
{
|
||||
// Base::Console().Message("DVS::prefCutSurface()\n");
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/Decorations");
|
||||
|
||||
return hGrp->GetInt("CutSurfaceDisplay", 2);//default to SvgHatch
|
||||
return Preferences::getPreferenceGroup("Decorations")->GetInt("CutSurfaceDisplay", 2);//default to SvgHatch
|
||||
}
|
||||
|
||||
bool DrawViewSection::showSectionEdges(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/TechDraw/General");
|
||||
return (hGrp->GetBool("ShowSectionEdges", true));
|
||||
return (Preferences::getPreferenceGroup("General")->GetBool("ShowSectionEdges", true));
|
||||
}
|
||||
|
||||
bool DrawViewSection::trimAfterCut() const { return TrimAfterCut.getValue(); }
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
# include <TopoDS_Vertex.hxx>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/GroupExtension.h>
|
||||
#include <App/Link.h>
|
||||
@@ -45,6 +44,7 @@
|
||||
|
||||
#include "ShapeExtractor.h"
|
||||
#include "DrawUtil.h"
|
||||
#include "Preferences.h"
|
||||
|
||||
|
||||
using namespace TechDraw;
|
||||
@@ -425,9 +425,7 @@ Base::Vector3d ShapeExtractor::getLocation3dFromFeat(App::DocumentObject* obj)
|
||||
|
||||
bool ShapeExtractor::prefAdd2d()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
|
||||
bool result = hGrp->GetBool("ShowLoose2d", false);
|
||||
bool result = Preferences::getPreferenceGroup("General")->GetBool("ShowLoose2d", false);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user