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;
+ }
}
}
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;
+ }
}
}
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;
+ }
}
}