[TD] remove some more superfluous nullptr checks
This commit is contained in:
@@ -67,19 +67,15 @@ void QGIViewSection::draw()
|
||||
void QGIViewSection::drawSectionFace()
|
||||
{
|
||||
auto section( dynamic_cast<TechDraw::DrawViewSection *>(getViewObject()) );
|
||||
if( section == nullptr ) {
|
||||
if (!section)
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !section->hasGeometry()) {
|
||||
if (!section->hasGeometry())
|
||||
return;
|
||||
}
|
||||
Gui::ViewProvider* gvp = QGIView::getViewProvider(section);
|
||||
ViewProviderViewSection* sectionVp = dynamic_cast<ViewProviderViewSection*>(gvp);
|
||||
if ((sectionVp == nullptr) ||
|
||||
(!sectionVp->ShowCutSurface.getValue())) {
|
||||
if (!sectionVp || !sectionVp->ShowCutSurface.getValue())
|
||||
return;
|
||||
}
|
||||
|
||||
float lineWidth = sectionVp->LineWidth.getValue();
|
||||
|
||||
@@ -152,9 +148,8 @@ void QGIViewSection::updateView(bool update)
|
||||
{
|
||||
Q_UNUSED(update);
|
||||
auto viewPart( dynamic_cast<TechDraw::DrawViewSection *>(getViewObject()) );
|
||||
if( viewPart == nullptr ) {
|
||||
if (!viewPart)
|
||||
return;
|
||||
}
|
||||
draw();
|
||||
QGIView::updateView(update);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user