From: mkr Date: Mon, 28 Apr 2008 08:44:52 +0000 (+0000) Subject: Fix for bug IPAL19512: Qt4 porting: Error message is shown after selection of Gauss... X-Git-Tag: V5_0_0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=421435679281e33c842b8db7231ef92d2372cd49;p=modules%2Fgui.git Fix for bug IPAL19512: Qt4 porting: Error message is shown after selection of Gauss point outside of secgmentation cursor => fix of SIGFPE exception during selection. --- diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index f50d67b30..d9f5d3321 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -81,7 +81,7 @@ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer) vtkFloatingPointType aPrecision = 1.0E-3; vtkFloatingPointType anOldScale = GetScale()[0]; vtkFloatingPointType aScale = mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(aSize[0])/vtkFloatingPointType(aSize[1])); - if(fabs(aScale - anOldScale)/aScale > aPrecision){ + if(aScale != 0.0 && fabs(aScale - anOldScale)/aScale > aPrecision){ SetScale(aScale); } }