From: ana Date: Fri, 19 Nov 2010 09:18:00 +0000 (+0000) Subject: Fix for the IPAL21997: Clipping planes problems X-Git-Tag: mergeto_V6_main_21Mar11~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=017d167c60a6a973a3551e1e4d1209d2590bc96e;p=modules%2Fvisu.git Fix for the IPAL21997: Clipping planes problems --- 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();