From: jfa Date: Wed, 18 May 2005 09:35:17 +0000 (+0000) Subject: PAL8824: correct distance is set on plane selection X-Git-Tag: V2_2_0_VISU_improvement_2005-05-27~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e64dad04aef30423a7951a52fa0c77a7c75822f5;p=modules%2Fvisu.git PAL8824: correct distance is set on plane selection --- diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index f202bdcf..c3facd12 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -776,7 +776,7 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam() aPlane->SetOrientation(anOrientation); aPlane->SetDistance(getDistance()); - myPrs3d->SetPlaneParam(aNormal, getDistance(), aPlane); + myPrs3d->SetPlaneParam(aNormal, 1. - getDistance(), aPlane); vtkDataSet* aDataSet = myPrs3d->GetInput(); float *aPnt = aDataSet->GetCenter(); diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.h b/src/VISUGUI/VisuGUI_ClippingDlg.h index 29b6cfcb..0c963983 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.h +++ b/src/VISUGUI/VisuGUI_ClippingDlg.h @@ -49,7 +49,7 @@ public: bool modal = false, WFlags fl = 0 ); - float getDistance() { return 1. - (float)SpinBoxDistance->value(); } + float getDistance() { return (float)SpinBoxDistance->value(); } void setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); } double getRotation1() { return SpinBoxRot1->value(); } double getRotation2() { return SpinBoxRot2->value(); }