From 017d167c60a6a973a3551e1e4d1209d2590bc96e Mon Sep 17 00:00:00 2001 From: ana Date: Fri, 19 Nov 2010 09:18:00 +0000 Subject: [PATCH] Fix for the IPAL21997: Clipping planes problems --- src/VISUGUI/VisuGUI_ClippingDlg.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index 2881bb37..bd9c12c6 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -1014,7 +1014,7 @@ void VisuGUI_ClippingDlg::onTabChanged(QWidget* newTab) // purpose : set non structured parameters by IJK parameters //================================================================================= void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam() -{ +{ if (myPlanes.empty() || myIsSelectPlane || !WidgetIJKTab->isEnabled()) return; @@ -1139,11 +1139,11 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured() // find index value double v = SpinBoxDistance->value(); // reverse value? -// bool reverse = (normal * axDir < 0); // normal and axis are opposite -// if (gridDir * axDir < 0) // grid dir and axis are opposite -// reverse = !reverse; -// if (reverse) -// v = 1. - v; + bool reverse = (normal * axDir < 0); // normal and axis are opposite + if (gridDir * axDir < 0) // grid dir and axis are opposite + reverse = !reverse; + if (reverse) + v = 1. - v; for (i = 0; i < values->size(); ++i) if ((*values)[ i ] > v) break; @@ -1153,11 +1153,11 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured() --i; // set control values + onIJKAxisChanged(gridAxId); // first of all update label and range of index myIsSelectPlane = true; CheckBoxIJKPlaneReverse->setChecked(normal * axDir < 0); SpinBoxIJKIndex->setValue(i); ButtonGroupIJKAxis->button(gridAxId)->setChecked( true ); - onIJKAxisChanged(gridAxId); // update label and range of index myIsSelectPlane = false; SetCurrentPlaneIJKParam(); -- 2.39.2