fix scan coverity issues: unchecked dynamic_cast
This commit is contained in:
@@ -175,6 +175,9 @@ void CmdTechDrawNewGeomHatch::activated(int iMsg)
|
||||
geomhatch->Source.setValue(objFeat, subNames);
|
||||
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(getDocument())->getViewProvider(geomhatch);
|
||||
TechDrawGui::ViewProviderGeomHatch* hvp = dynamic_cast<TechDrawGui::ViewProviderGeomHatch*>(vp);
|
||||
if( hvp == nullptr ) {
|
||||
return;
|
||||
}
|
||||
// if (!hvp) {
|
||||
|
||||
// dialog to fill in hatch values
|
||||
|
||||
@@ -115,6 +115,8 @@ void QGIViewImage::draw()
|
||||
}
|
||||
|
||||
auto viewImage( dynamic_cast<TechDraw::DrawViewImage*>(getViewObject()) );
|
||||
if (!viewImage)
|
||||
return;
|
||||
QRectF newRect(0.0,0.0,Rez::guiX(viewImage->Width.getValue()),Rez::guiX(viewImage->Height.getValue()));
|
||||
double pad = Rez::guiX(1.0);
|
||||
m_cliparea->setRect(newRect.adjusted(-pad,-pad,pad,pad));
|
||||
|
||||
Reference in New Issue
Block a user