]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for IPAL20140 (4x: Hang up on edit deformed shape). V4_1_0_maintainance_20081020
authorrnv <rnv@opencascade.com>
Fri, 17 Oct 2008 12:07:18 +0000 (12:07 +0000)
committerrnv <rnv@opencascade.com>
Fri, 17 Oct 2008 12:07:18 +0000 (12:07 +0000)
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx

index ad0cb6430784b0e30d3bfee21ff3ca2ca8c7bf81..a8e513c5992fe01402debde2bbc424f42ad7e13c 100644 (file)
@@ -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;
+      }
     }
   }
 
index f66ae75ee84fbcc046b6a4c73b7375ad5638136e..2ca0343e642d6758525b45dbe7117974b09f7c8f 100644 (file)
@@ -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;
+      }
     }
   }
 
index aa5554f18dc28480771f982e31c6ec2713873635..e88797bc8c54d11820398f67e7e350c891dc1aee 100644 (file)
@@ -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;
+      }
     }
   }