[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

@@ -522,12 +522,7 @@ double DrawUtil::sensibleScale(double working_scale)
double DrawUtil::getDefaultLineWeight(std::string lineType)
{
int lgNumber = Preferences::lineGroup();
auto lg = LineGroup::lineGroupFactory(lgNumber);
double weight = lg->getWeight(lineType);
delete lg; //Coverity CID 174671
return weight;
return TechDraw::LineGroup::getDefaultWidth(lineType);
}
bool DrawUtil::isBetween(const Base::Vector3d pt, const Base::Vector3d end1, const Base::Vector3d end2)