From 7330adc4b905a6c4189402beb6b87885ed593dca Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 22 Nov 2005 11:34:50 +0000 Subject: [PATCH] Fixed bug GVIEW10591 : segmentation plane with null normal --- src/VVTK/VVTK_SegmentationCursorDlg.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.cxx b/src/VVTK/VVTK_SegmentationCursorDlg.cxx index d47df005..bfc710ce 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.cxx +++ b/src/VVTK/VVTK_SegmentationCursorDlg.cxx @@ -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() ); -- 2.39.2