// purpose : set non structured parameters by IJK parameters
//=================================================================================
void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
-{
+{
if (myPlanes.empty() || myIsSelectPlane || !WidgetIJKTab->isEnabled())
return;
// 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;
--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();