[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

@@ -426,17 +426,12 @@ void TaskCenterLine::enableTaskButtons(bool b)
double TaskCenterLine::getCenterWidth()
{
int lgNumber = Preferences::lineGroup();
auto lg = TechDraw::LineGroup::lineGroupFactory(lgNumber);
double width = lg->getWeight("Graphic");
delete lg;
Gui::ViewProvider* vp = QGIView::getViewProvider(m_partFeat);
auto partVP = dynamic_cast<ViewProviderViewPart*>(vp);
if (partVP) {
width = partVP->IsoWidth.getValue();
if (!partVP) {
return TechDraw::LineGroup::getDefaultWidth("Graphic");
}
return width;
return partVP->IsoWidth.getValue();
}
Qt::PenStyle TaskCenterLine::getCenterStyle()