[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 708f5e4930
commit 15fe52a04b
36 changed files with 101 additions and 355 deletions

View File

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