[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

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