]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for bug 10277: Plot3D presentation becomes incorrect after arranging actors
authorjfa <jfa@opencascade.com>
Mon, 17 Oct 2005 09:08:23 +0000 (09:08 +0000)
committerjfa <jfa@opencascade.com>
Mon, 17 Oct 2005 09:08:23 +0000 (09:08 +0000)
src/VISUGUI/VisuGUI_TimeAnimation.cxx

index 0598764e379343b0ef5915d9b230453c50914dfd..1e7ac208b9c7a19c1335ab84a1b70382482443ca 100644 (file)
@@ -373,9 +373,9 @@ void ArrangeDlg::acceptViewWindow()
          aDist = fabs(aBounds[5] - aBounds[4]);
        }
        float aOffset[3];
-       aOffset[0] = (aBounds[1] < aBounds[0]) ? -aBounds[1] : -aBounds[0];
-        aOffset[1] = (aBounds[3] < aBounds[2]) ? -aBounds[3] : -aBounds[2];
-        aOffset[2] = (aBounds[5] < aBounds[4]) ? -aBounds[5] : -aBounds[4];
+        aOffset[0] = aOffset[1] = aOffset[2] = 0;
+        aOffset[aAxis] =
+          (aBounds[2*aAxis+1] < aBounds[2*aAxis]) ? -aBounds[2*aAxis+1] : -aBounds[2*aAxis];
 
         if (i > 0) {
           float aCCDist = (aDist + aPrevDist) / 2.0;