[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 750fa24b2e
commit 86dfd0a862
12 changed files with 29 additions and 69 deletions

View File

@@ -778,11 +778,7 @@ int TaskLeaderLine::getPrefArrowStyle()
double TaskLeaderLine::prefWeight() const
{
int lgNumber = Preferences::lineGroup();
auto lg = TechDraw::LineGroup::lineGroupFactory(lgNumber);
double weight = lg->getWeight("Thin");
delete lg; //Coverity CID 174670
return weight;
return TechDraw::LineGroup::getDefaultWidth("Thin");
}
App::Color TaskLeaderLine::prefLineColor(void)