[TechDraw] Simplify retrievement of user preferences

for all TechDraw files
This commit is contained in:
Benjamin Bræstrup Sayoc
2023-04-09 16:18:55 +02:00
committed by WandererFan
parent 50c2b7e9d8
commit 5d05acc87e
36 changed files with 101 additions and 355 deletions

View File

@@ -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;
}