0031643: Visualization - Graphic3d_Camera::Copy() raises exception on copying ZNear...
authorkgv <kgv@opencascade.com>
Tue, 30 Jun 2020 22:12:37 +0000 (01:12 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 3 Jul 2020 08:03:06 +0000 (11:03 +0300)
Graphic3d_Camera::CopyMappingData() now copies ProjectionType at first.

src/Graphic3d/Graphic3d_Camera.cxx

index a2abd6a..12ef55d 100644 (file)
@@ -139,6 +139,7 @@ Graphic3d_Camera::Graphic3d_Camera (const Handle(Graphic3d_Camera)& theOther)
 // =======================================================================
 void Graphic3d_Camera::CopyMappingData (const Handle(Graphic3d_Camera)& theOtherCamera)
 {
+  SetProjectionType (theOtherCamera->ProjectionType());
   SetFOVy           (theOtherCamera->FOVy());
   SetFOV2d          (theOtherCamera->FOV2d());
   SetZRange         (theOtherCamera->ZNear(), theOtherCamera->ZFar());
@@ -146,7 +147,6 @@ void Graphic3d_Camera::CopyMappingData (const Handle(Graphic3d_Camera)& theOther
   SetScale          (theOtherCamera->Scale());
   SetZFocus         (theOtherCamera->ZFocusType(), theOtherCamera->ZFocus());
   SetIOD            (theOtherCamera->GetIODType(), theOtherCamera->IOD());
-  SetProjectionType (theOtherCamera->ProjectionType());
   SetTile           (theOtherCamera->myTile);
 
   ResetCustomProjection();