[TechDraw] Return logic simplification (#16504)

* [TechDraw] AppTechDrawPy.cpp return logic simplification

* [TechDraw] CosmeticExtension.cpp return logic simplification

* [TechDraw] DrawBrokenView.cpp return logic simplification

* [TechDraw] HatchLine.cpp return logic simplification

* [TechDraw] LineGenerator.cpp return logic simplification

* [TechDraw] Preferences.cpp return logic simplification

* [TechDraw] ShapeExtractor.cpp return logic simplification

* [TechDraw] MDIViewPage.cpp return logic simplification

* [TechDraw] QGILeaderLine.cpp return logic simplification

* [TechDraw] QGIRichAnno.cpp return logic simplification

* [TechDraw] QGTracker.cpp return logic simplification
This commit is contained in:
Benjamin Bræstrup Sayoc
2024-11-18 20:14:47 +01:00
committed by GitHub
parent 00acfd5b2a
commit 52fe0eec53
11 changed files with 32 additions and 64 deletions

View File

@@ -177,7 +177,6 @@ int LineGenerator::fromQtStyle(Qt::PenStyle style)
{
// Base::Console().Message("DLG::fromQtStyle(%d)\n", style);
int result { 0 };
// the 4 standard Qt::PenStyles and ISO128 equivalents
int dashed = 2;
int dotted = 7;
@@ -199,29 +198,22 @@ int LineGenerator::fromQtStyle(Qt::PenStyle style)
switch (style) {
case Qt::NoPen:
case Qt::SolidLine:
result = 1;
break;
return 1;
case Qt::DashLine:
result = dashed;
break;
return dashed;
case Qt::DotLine:
result = dotted;
break;
return dotted;
case Qt::DashDotLine:
result = dashDot;
break;
return dashDot;
case Qt::DashDotDotLine:
result = dashDotDot;
break;
return dashDotDot;
case Qt::CustomDashLine:
// not sure what to do here. we would have to match the custom pattern
// to the patterns of the ISO lines and set the dash pattern accordingly.
result = 2;
break;
return 2;
default:
result = 0;
return 0;
}
return result;
}