Salome HOME
Merge remote branch 'origin/V7_dev'
[modules/gui.git] / src / OCCViewer / OCCViewer_ClipPlane.cxx
index 8584ddcb03e261a947f6c1bcfd445decc406a65d..d4d266fb40ffb291d3ccdfa771e228767043590a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -117,9 +117,10 @@ void OCCViewer_ClipPlane::OrientationToXYZ( double &theDx, double &theDy, double
         break;
 
       case AbsoluteCustom :
-        theDx = AbsoluteOrientation.Dx;
-        theDy = AbsoluteOrientation.Dy;
-        theDz = AbsoluteOrientation.Dz;
+        int anInvertCoeff = AbsoluteOrientation.IsInvert ? 1 : -1;
+        theDx = anInvertCoeff * AbsoluteOrientation.Dx;
+        theDy = anInvertCoeff * AbsoluteOrientation.Dy;
+        theDz = anInvertCoeff * AbsoluteOrientation.Dz;
         break;
     }