Modify defaults for otho-camera (disable rotations).
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Oct 2007 14:54:53 +0000 (14:54 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Oct 2007 14:54:53 +0000 (14:54 +0000)
EVE/Reve/Viewer.cxx

index 25dad3403974a6159a1cab2f59d69cae590d069a..e72273795b841490a6c795542761659de28fbde2 100644 (file)
@@ -9,6 +9,8 @@
 #include <TGLSAViewer.h>
 #include <TGLScenePad.h>
 
+#include <TGLOrthoCamera.h> // For fixing defaults in root 5.17.4
+
 using namespace Reve;
 
 //______________________________________________________________________
@@ -37,6 +39,15 @@ void Viewer::SetGLViewer(TGLViewer* s)
   fGLViewer->SetSmartRefresh(kTRUE);
   // fGLViewer->SetResetCamerasOnUpdate(kFALSE);
   fGLViewer->SetResetCameraOnDoubleClick(kFALSE);
+
+  // Temporary fix for wrong defaults in root 5.17.04
+  fGLViewer->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  ((TGLOrthoCamera&)(fGLViewer->CurrentCamera())).SetEnableRotate(kTRUE);
+  fGLViewer->SetCurrentCamera(TGLViewer::kCameraOrthoXOZ);
+  ((TGLOrthoCamera&)(fGLViewer->CurrentCamera())).SetEnableRotate(kTRUE);
+  fGLViewer->SetCurrentCamera(TGLViewer::kCameraOrthoZOY);
+  ((TGLOrthoCamera&)(fGLViewer->CurrentCamera())).SetEnableRotate(kTRUE);
+  fGLViewer->SetCurrentCamera(TGLViewer::kCameraPerspXOZ);
 }
 
 void Viewer::SpawnGLViewer(const TGWindow* parent, TGedEditor* ged)