[TechDraw] Simplify return logic
This commit is contained in:
committed by
WandererFan
parent
5d05acc87e
commit
3794897699
@@ -96,8 +96,7 @@ App::Color LineFormat::getDefEdgeColor()
|
||||
|
||||
int LineFormat::getDefEdgeStyle()
|
||||
{
|
||||
int style = Preferences::getPreferenceGroup("Decorations")->GetInt("CosmoCLStyle", 2); //dashed
|
||||
return style;
|
||||
return Preferences::getPreferenceGroup("Decorations")->GetInt("CosmoCLStyle", 2); //dashed
|
||||
}
|
||||
|
||||
//******************************************
|
||||
|
||||
@@ -571,20 +571,18 @@ void DrawView::setScaleAttribute()
|
||||
|
||||
int DrawView::prefScaleType()
|
||||
{
|
||||
int result = Preferences::getPreferenceGroup("General")->GetInt("DefaultScaleType", 0);
|
||||
return result;
|
||||
return Preferences::getPreferenceGroup("General")->GetInt("DefaultScaleType", 0);
|
||||
}
|
||||
|
||||
double DrawView::prefScale()
|
||||
{
|
||||
double result = Preferences::getPreferenceGroup("General")->GetFloat("DefaultViewScale", 1.0);
|
||||
if (ScaleType.isValue("Page")) {
|
||||
auto page = findParentPage();
|
||||
if (page) {
|
||||
result = page->Scale.getValue();
|
||||
return page->Scale.getValue();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return Preferences::getPreferenceGroup("General")->GetFloat("DefaultViewScale", 1.0);
|
||||
}
|
||||
|
||||
void DrawView::requestPaint()
|
||||
|
||||
@@ -1192,7 +1192,7 @@ int DrawViewSection::prefCutSurface(void) const
|
||||
|
||||
bool DrawViewSection::showSectionEdges(void)
|
||||
{
|
||||
return (Preferences::getPreferenceGroup("General")->GetBool("ShowSectionEdges", true));
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("ShowSectionEdges", true);
|
||||
}
|
||||
|
||||
bool DrawViewSection::trimAfterCut() const { return TrimAfterCut.getValue(); }
|
||||
|
||||
@@ -425,7 +425,6 @@ Base::Vector3d ShapeExtractor::getLocation3dFromFeat(App::DocumentObject* obj)
|
||||
|
||||
bool ShapeExtractor::prefAdd2d()
|
||||
{
|
||||
bool result = Preferences::getPreferenceGroup("General")->GetBool("ShowLoose2d", false);
|
||||
return result;
|
||||
return Preferences::getPreferenceGroup("General")->GetBool("ShowLoose2d", false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user