From 9244cdd837c16bc964b1691cfbc03bc772552589 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 17 Oct 2008 12:07:18 +0000 Subject: [PATCH] Fix for IPAL20140 (4x: Hang up on edit deformed shape). --- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 12 +++++++----- src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx | 12 +++++++----- src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx | 12 +++++++----- 3 files changed, 21 insertions(+), 15 deletions(-) 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; + } } } -- 2.39.2