[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

@@ -549,21 +549,16 @@ std::string Preferences::currentElementDefFile()
int Preferences::LineCapStyle()
{
int currentIndex = LineCapIndex();
int result{0x20};
switch (currentIndex) {
switch (currentIndex) {
case 0:
result = static_cast<Qt::PenCapStyle>(0x20); //round;
break;
return static_cast<Qt::PenCapStyle>(0x20); //round;
case 1:
result = static_cast<Qt::PenCapStyle>(0x10); //square;
break;
return static_cast<Qt::PenCapStyle>(0x10); //square;
case 2:
result = static_cast<Qt::PenCapStyle>(0x00); //flat
break;
return static_cast<Qt::PenCapStyle>(0x00); //flat
default:
result = static_cast<Qt::PenCapStyle>(0x20);
return static_cast<Qt::PenCapStyle>(0x20);
}
return result;
}
//! returns the line cap index without conversion to a Qt::PenCapStyle