[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:
committed by
GitHub
parent
00acfd5b2a
commit
52fe0eec53
@@ -1061,8 +1061,6 @@ void MDIViewPage::removeUnselectedTreeSelection(QList<QGraphicsItem*> sceneSelec
|
||||
bool MDIViewPage::compareSelections(std::vector<Gui::SelectionObject> treeSel,
|
||||
QList<QGraphicsItem*> sceneSel)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
if (treeSel.empty() && sceneSel.empty()) {
|
||||
return true;
|
||||
}
|
||||
@@ -1141,7 +1139,7 @@ bool MDIViewPage::compareSelections(std::vector<Gui::SelectionObject> treeSel,
|
||||
return false;
|
||||
}
|
||||
|
||||
return result;
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////end Selection Routines //////////////////////
|
||||
|
||||
@@ -596,8 +596,7 @@ double QGILeaderLine::getLineWidth()
|
||||
|
||||
TechDraw::DrawLeaderLine* QGILeaderLine::getLeaderFeature()
|
||||
{
|
||||
TechDraw::DrawLeaderLine* result = static_cast<TechDraw::DrawLeaderLine*>(getViewObject());
|
||||
return result;
|
||||
return static_cast<TechDraw::DrawLeaderLine*>(getViewObject());
|
||||
}
|
||||
|
||||
double QGILeaderLine::getEdgeFuzz() const
|
||||
@@ -637,12 +636,11 @@ void QGILeaderLine::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt
|
||||
|
||||
bool QGILeaderLine::useOldCoords() const
|
||||
{
|
||||
bool result = false;
|
||||
auto vp = dynamic_cast<ViewProviderLeader*>(getViewProvider(getViewObject()));
|
||||
if (vp) {
|
||||
result = vp->UseOldCoords.getValue();
|
||||
return vp->UseOldCoords.getValue();
|
||||
}
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -279,9 +279,7 @@ QString QGIRichAnno::convertTextSizes(const QString& inHtml) const
|
||||
|
||||
TechDraw::DrawRichAnno* QGIRichAnno::getFeature()
|
||||
{
|
||||
TechDraw::DrawRichAnno* result =
|
||||
static_cast<TechDraw::DrawRichAnno*>(getViewObject());
|
||||
return result;
|
||||
return static_cast<TechDraw::DrawRichAnno*>(getViewObject());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -483,10 +483,7 @@ QColor QGTracker::getTrackerColor()
|
||||
|
||||
double QGTracker::getTrackerWeight()
|
||||
{
|
||||
double result = 1.0;
|
||||
result = Preferences::getPreferenceGroup("Tracker")->GetFloat("TrackerWeight", 4.0);
|
||||
|
||||
return result;
|
||||
return Preferences::getPreferenceGroup("Tracker")->GetFloat("TrackerWeight", 4.0);
|
||||
}
|
||||
|
||||
#include <Mod/TechDraw/Gui/moc_QGTracker.cpp>
|
||||
|
||||
Reference in New Issue
Block a user