From: rnv Date: Fri, 17 Oct 2008 12:07:18 +0000 (+0000) Subject: Fix for IPAL20140 (4x: Hang up on edit deformed shape). X-Git-Tag: V4_1_0_maintainance_20081020 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9244cdd837c16bc964b1691cfbc03bc772552589;p=modules%2Fvisu.git Fix for IPAL20140 (4x: Hang up on edit deformed shape). --- diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index ad0cb643..a8e513c5 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -293,11 +293,13 @@ double VisuGUI_CutPlanesPane::getScaleFactor(){ void VisuGUI_CutPlanesPane::setScaleFactor(double theFactor){ double i=0.1; - while (1) { // Calculate Step & Precission - if ( int (theFactor/i) > 0) - break; - else { - i = i*0.1; + if(theFactor!=0){ + while (1) { // Calculate Step & Precission + if ( int (theFactor/i) > 0) + break; + else { + i = i*0.1; + } } } diff --git a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx index f66ae75e..2ca0343e 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx @@ -280,11 +280,13 @@ void VisuGUI_DeformedShapeAndScalarMapDlg::initFromPrsObject( VISU::ColoredPrs3d void VisuGUI_DeformedShapeAndScalarMapDlg::setFactor(double theFactor) { double i=0.1; - while (1) { // Calculate Step & Precission - if ( int (theFactor/i) > 0) - break; - else { - i = i*0.1; + if(theFactor != 0) { + while (1) { // Calculate Step & Precission + if ( int (theFactor/i) > 0) + break; + else { + i = i*0.1; + } } } diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx index aa5554f1..e88797bc 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx @@ -169,11 +169,13 @@ void VisuGUI_DeformedShapeDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, void VisuGUI_DeformedShapeDlg::setFactor(double theFactor) { double i=0.1; - while (1) { // Calculate Step & Precission - if ( int (theFactor/i) > 0) - break; - else { - i = i*0.1; + if(theFactor!=0) { + while (1) { // Calculate Step & Precission + if ( int (theFactor/i) > 0) + break; + else { + i = i*0.1; + } } }