]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fixed bug GVIEW10591 : segmentation plane with null normal
authorouv <ouv@opencascade.com>
Tue, 22 Nov 2005 11:34:50 +0000 (11:34 +0000)
committerouv <ouv@opencascade.com>
Tue, 22 Nov 2005 11:34:50 +0000 (11:34 +0000)
src/VVTK/VVTK_SegmentationCursorDlg.cxx

index d47df005e66315780d1968d3d251b189537b9d23..bfc710cee05c6bd1c5ce1aed79eb4fec30e23f4b 100644 (file)
@@ -505,6 +505,12 @@ void VVTK_SegmentationCursorDlg::ApplySegmentationCursor()
   normal[0] = myDXDirectionSpinBox->value();
   normal[1] = myDYDirectionSpinBox->value();
   normal[2] = myDZDirectionSpinBox->value();
+
+  if( normal[0] == 0.0 && normal[1] == 0.0 && normal[2] == 0.0 )
+  {
+    normal[2] = 1.0;
+    myDZDirectionSpinBox->setValue( 1.0 );
+  }
   myWidget->SetNormal( normal );
 
   myWidget->SetDistance( myDepthSpinBox->value() );