[TechDraw] Simplify code getting default line weights

This commit is contained in:
Benjamin Bræstrup Sayoc
2022-08-02 14:11:13 +02:00
committed by WandererFan
parent bbbc044934
commit f30c30b06f
12 changed files with 29 additions and 69 deletions

View File

@@ -178,10 +178,7 @@ void ViewProviderGeomHatch::updateGraphic(void)
void ViewProviderGeomHatch::getParameters(void)
{
int lgNumber = Preferences::lineGroup();
auto lg = TechDraw::LineGroup::lineGroupFactory(lgNumber);
double weight = lg->getWeight("Graphic");
delete lg; //Coverity CID 174667
double weight = TechDraw::LineGroup::getDefaultWidth("Graphic");
WeightPattern.setValue(weight);
}