]> OCCT Git - occt.git/commitdiff
0032708: Visualization, V3d_View::SetImmediateUpdate() - deprecate and disable by... CR32708
authorkgv <kgv@opencascade.com>
Thu, 2 Dec 2021 14:02:47 +0000 (17:02 +0300)
committerkgv <kgv@opencascade.com>
Thu, 2 Dec 2021 14:02:47 +0000 (17:02 +0300)
17 files changed:
dox/upgrade/upgrade.md
samples/glfw/GlfwOcctView.cpp
samples/java/jniviewer/app/src/main/jni/OcctJni_Viewer.cxx
samples/mfc/standard/09_Animation/src/AnimationView3D.cpp
samples/mfc/standard/Common/OCC_BaseView.cpp
samples/qt/AndroidQt/src/AndroidQt.cxx
samples/webgl/WasmOcctView.cpp
src/AIS/AIS_AnimationCamera.cxx
src/AIS/AIS_ViewController.cxx
src/AIS/AIS_ViewCube.cxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/V3d/V3d_Viewer.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_AutoUpdater.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx

index 6e4a60b47e2b0c1c07be812103293821cd85193c..7c26168e90a0b8762cf03e75a435e5281bb0f554 100644 (file)
@@ -2318,3 +2318,10 @@ aValidateEdge.Process();
 `Prs3d_Drawer` getters no more implicitly create "default" aspects.
 If specific property has not been set before to this drawer instance nor to linked drawer instance, then NULL property will be returned.
 Make sure to set property beforehand or to call `SetOwn*` / `SetupOwn*` methods to derive from defaults.
+
+@subsection upgrade_occt770_view_immupdate V3d_View implicit updates
+
+`V3d_View::SetImmediateUpdate()` flag has been deprecated and is now disabled by default.
+So that methods like `V3d_View::Rotation()` or `V3d_View::Panning()` will no more automatically redraw View contents.
+Application relying on previous behavior still may use `V3d_View::SetImmediateUpdate()` to turn back implicit updates,
+but encouraged to update their code and put explicit `V3d_View::Redraw()` where necessary, as this functionality will be removed in future.
index 36108497bf604cc246a4972626404c145db44362..9c8bf3367a781153549425d673bb4b3108b444d8 100644 (file)
@@ -175,7 +175,6 @@ void GlfwOcctView::initViewer()
   aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
   aViewer->ActivateGrid (Aspect_GT_Rectangular, Aspect_GDM_Lines);
   myView = aViewer->CreateView();
-  myView->SetImmediateUpdate (false);
   myView->SetWindow (myOcctWindow, myOcctWindow->NativeGlContext());
   myView->ChangeRenderingParams().ToShowStats = true;
   myContext = new AIS_InteractiveContext (aViewer);
index 14a05680ba3d17e7fbb1a23f53f8f610fa107b4e..f7455e3555bc301c4aeb60491d0eb0b2bc14e0e5 100644 (file)
@@ -259,7 +259,6 @@ bool OcctJni_Viewer::init()
   Handle(Aspect_NeutralWindow) aWindow = new Aspect_NeutralWindow();
   aWindow->SetSize (aWidth, aHeight);
   myView = myViewer->CreateView();
-  myView->SetImmediateUpdate (false);
   myView->ChangeRenderingParams().Resolution = (unsigned int )(96.0 * myDevicePixelRatio + 0.5);
   myView->ChangeRenderingParams().ToShowStats = true;
   myView->ChangeRenderingParams().CollectedStats = (Graphic3d_RenderingParams::PerfCounters ) (Graphic3d_RenderingParams::PerfCounters_FrameRate | Graphic3d_RenderingParams::PerfCounters_Triangles);
index 1cc55b62e73b981664f2d051e010e64e54469da9..7559c3483007423ad90457979ce66a8bc6bc4ffe 100755 (executable)
@@ -171,7 +171,6 @@ void CAnimationView3D::OnInitialUpdate()
   aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
 
   myView = aViewer->CreateView();
-  myView->SetImmediateUpdate (false);
 
   // store for restore state after rotation (witch is in Degenerated mode)
   myHlrModeIsOn = myView->ComputedMode();
index a8531b7291e7ad65cf6ed241a0ed686a038ba210..b29604a6bf49d83ebee530f800aa6eef47dad77a 100755 (executable)
@@ -87,7 +87,6 @@ void OCC_BaseView::OnInitialUpdate()
   }
 
   myView = GetAISContext()->CurrentViewer()->CreateView();
-  myView->SetImmediateUpdate (false);
   myView->SetComputedMode (Standard_False);
 
   Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast (myView->Viewer()->Driver());
index c73d00a5efc8c80941738c24e99bb60b378273cc..505034f604a65489e72190bb063bb485c84ba679 100644 (file)
@@ -348,7 +348,6 @@ bool AndroidQt::initViewer (Aspect_Drawable theWin)
 #endif
 
   myView = myViewer->CreateView();
-  myView->SetImmediateUpdate (Standard_False);
 
 #ifdef __ANDROID__
   myView->SetWindow (aWindow, (Aspect_RenderingContext )anEglContext);
index 53e0096030fdbfbc91beead7e82388018ed82377..ab64b49a76ae9996d1072bddad23334eee01da2c 100644 (file)
@@ -342,7 +342,6 @@ bool WasmOcctView::initViewer()
 
   myView = new V3d_View (aViewer);
   myView->Camera()->SetProjectionType (Graphic3d_Camera::Projection_Perspective);
-  myView->SetImmediateUpdate (false);
   myView->ChangeRenderingParams().IsShadowEnabled = false;
   myView->ChangeRenderingParams().Resolution = (unsigned int )(96.0 * myDevicePixelRatio + 0.5);
   myView->ChangeRenderingParams().ToShowStats = true;
index 8ca5e2ea36ec9565be17ab91010fd1f75da9aff6..d699a738af52d9d8b92b401a2db04ed86536b1dd 100644 (file)
@@ -50,8 +50,14 @@ void AIS_AnimationCamera::update (const AIS_AnimationProgress& theProgress)
   Graphic3d_CameraLerp aCamLerp (myCamStart, myCamEnd);
   aCamLerp.Interpolate (HasOwnDuration() ? theProgress.LocalNormalized : 1.0, aCamera);
 
+Standard_DISABLE_DEPRECATION_WARNINGS
   const Standard_Boolean aPrevImmUpdate = myView->SetImmediateUpdate (Standard_False);
+Standard_ENABLE_DEPRECATION_WARNINGS
+
   myView->SetCamera (aCamera);
-  myView->SetImmediateUpdate (aPrevImmUpdate);
   myView->Invalidate();
+
+Standard_DISABLE_DEPRECATION_WARNINGS
+  myView->SetImmediateUpdate (aPrevImmUpdate);
+Standard_ENABLE_DEPRECATION_WARNINGS
 }
index 2d086594259bef030c70e3214c045ce22fc8eec9..3a5c590531e6aaea822d18da14de23e4e934ccda 100644 (file)
@@ -3239,7 +3239,9 @@ void AIS_ViewController::handleXRPresentations (const Handle(AIS_InteractiveCont
 void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)& theCtx,
                                            const Handle(V3d_View)& theView)
 {
+Standard_DISABLE_DEPRECATION_WARNINGS
   const bool wasImmediateUpdate = theView->SetImmediateUpdate (false);
+Standard_ENABLE_DEPRECATION_WARNINGS
 
   handleViewOrientationKeys (theCtx, theView);
   const AIS_WalkDelta aWalk = handleNavigationKeys (theCtx, theView);
@@ -3256,7 +3258,9 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)&
   handleViewRedraw (theCtx, theView);
   theView->View()->UnsetXRPosedCamera();
 
+Standard_DISABLE_DEPRECATION_WARNINGS
   theView->SetImmediateUpdate (wasImmediateUpdate);
+Standard_ENABLE_DEPRECATION_WARNINGS
 
   // make sure to not process the same events twice
   myGL.Reset();
index 1e405cb44f304fbb23862bd94933a0bad7430886..656e5b2dc507e0fc6c85b29a6ab5e416b2bd52ca 100644 (file)
@@ -892,11 +892,17 @@ void AIS_ViewCube::StartAnimation (const Handle(AIS_ViewCubeOwner)& theOwner)
   {
     {
       Handle(Graphic3d_Camera) aBackupCamera = aView->Camera();
+    Standard_DISABLE_DEPRECATION_WARNINGS
       const bool wasImmediateUpdate = aView->SetImmediateUpdate (false);
+    Standard_ENABLE_DEPRECATION_WARNINGS
+
       aView->SetCamera (myEndState);
       aView->SetProj (theOwner->MainOrientation(), myIsYup);
       aView->SetCamera (aBackupCamera);
+
+    Standard_DISABLE_DEPRECATION_WARNINGS
       aView->SetImmediateUpdate (wasImmediateUpdate);
+    Standard_ENABLE_DEPRECATION_WARNINGS
     }
 
     const gp_Dir aNewDir = myEndState->Direction();
index c5e768b3dffaee0da58525df37ea40b3187224ea..1485f3968ac2db10de99831b4eb1f0eaec76f2ed 100644 (file)
@@ -66,7 +66,8 @@ namespace
 //purpose  :
 //=============================================================================
 V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView theType)
-: myIsInvalidatedImmediate (Standard_True),
+: myImmediateUpdate (Standard_False),
+  myIsInvalidatedImmediate (Standard_True),
   MyViewer (theViewer.operator->()),
   SwitchSetFront (Standard_False),
   myZRotation (Standard_False),
@@ -90,7 +91,6 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
 
   myDefaultCamera = new Graphic3d_Camera();
 
-  myImmediateUpdate = Standard_False;
   SetAutoZFitMode (Standard_True, 1.0);
   SetBackFacingModel (V3d_TOBM_AUTOMATIC);
   SetCamera (aCamera);
@@ -107,7 +107,6 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
   SetViewOrientationDefault();
   theViewer->AddView (this);
   Init();
-  myImmediateUpdate = Standard_True;
 }
 
 //=============================================================================
@@ -115,7 +114,8 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
 //purpose  :
 //=============================================================================
 V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)& theView)
-: myIsInvalidatedImmediate (Standard_True),
+: myImmediateUpdate (Standard_False),
+  myIsInvalidatedImmediate (Standard_True),
   MyViewer (theViewer.operator->()),
   SwitchSetFront(Standard_False),
   myZRotation (Standard_False),
@@ -129,11 +129,9 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)&
 
   myDefaultCamera = new Graphic3d_Camera (theView->DefaultCamera());
 
-  myImmediateUpdate = Standard_False;
   SetAutoZFitMode (theView->AutoZFitMode(), theView->AutoZFitScaleFactor());
   theViewer->AddView (this);
   Init();
-  myImmediateUpdate = Standard_True;
 }
 
 //=============================================================================
@@ -990,7 +988,8 @@ void V3d_View::SetEye(const Standard_Real X,const Standard_Real Y,const Standard
 {
   Standard_Real aTwistBefore = Twist();
 
-  Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False);
+  const Standard_Boolean wasUpdateEnabled = myImmediateUpdate;
+  myImmediateUpdate = Standard_False;
 
   Handle(Graphic3d_Camera) aCamera = Camera();
 
@@ -998,7 +997,7 @@ void V3d_View::SetEye(const Standard_Real X,const Standard_Real Y,const Standard
 
   SetTwist (aTwistBefore);
 
-  SetImmediateUpdate (wasUpdateEnabled);
+  myImmediateUpdate = wasUpdateEnabled;
 
   ImmediateUpdate();
 }
@@ -1042,13 +1041,14 @@ void V3d_View::SetProj( const Standard_Real Vx,const Standard_Real Vy, const Sta
 
   Standard_Real aTwistBefore = Twist();
 
-  Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False);
+  const Standard_Boolean wasUpdateEnabled = myImmediateUpdate;
+  myImmediateUpdate = Standard_False;
 
   Camera()->SetDirection (gp_Dir (Vx, Vy, Vz).Reversed());
 
   SetTwist(aTwistBefore);
 
-  SetImmediateUpdate (wasUpdateEnabled);
+  myImmediateUpdate = wasUpdateEnabled;
 
   ImmediateUpdate();
 }
@@ -1107,13 +1107,14 @@ void V3d_View::SetAt(const Standard_Real X,const Standard_Real Y,const Standard_
 {
   Standard_Real aTwistBefore = Twist();
 
-  Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False);
+  const Standard_Boolean wasUpdateEnabled = myImmediateUpdate;
+  myImmediateUpdate = Standard_False;
 
   Camera()->SetCenter (gp_Pnt (X, Y, Z));
 
   SetTwist (aTwistBefore);
 
-  SetImmediateUpdate (wasUpdateEnabled);
+  myImmediateUpdate = wasUpdateEnabled;
 
   ImmediateUpdate();
 }
@@ -1513,7 +1514,8 @@ void V3d_View::WindowFit (const Standard_Integer theMinXp,
                           const Standard_Integer theMaxXp,
                           const Standard_Integer theMaxYp)
 {
-  Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False);
+  const Standard_Boolean wasUpdateEnabled = myImmediateUpdate;
+  myImmediateUpdate = Standard_False;
 
   Handle(Graphic3d_Camera) aCamera = Camera();
 
@@ -1559,7 +1561,7 @@ void V3d_View::WindowFit (const Standard_Integer theMinXp,
     FitAll (aX1, aY1, aX2, aY2);
   }
 
-  SetImmediateUpdate (wasUpdateEnabled);
+  myImmediateUpdate = wasUpdateEnabled;
 
   ImmediateUpdate();
 }
@@ -2363,7 +2365,8 @@ void V3d_View::Panning (const Standard_Real theDXv,
     myCamStartOpCenter = aCamera->Center();
   }
 
-  Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False);
+  const Standard_Boolean wasUpdateEnabled = myImmediateUpdate;
+  myImmediateUpdate = Standard_False;
 
   gp_Pnt aViewDims = aCamera->ViewDimensions();
 
@@ -2372,7 +2375,7 @@ void V3d_View::Panning (const Standard_Real theDXv,
   Translate (aCamera, -theDXv, -theDYv);
   Scale (aCamera, aViewDims.X() / theZoomFactor, aViewDims.Y() / theZoomFactor);
 
-  SetImmediateUpdate (wasUpdateEnabled);
+  myImmediateUpdate = wasUpdateEnabled;
 
   ImmediateUpdate();
 }
@@ -2416,7 +2419,8 @@ void V3d_View::ZoomAtPoint (const Standard_Integer theMouseStartX,
                             const Standard_Integer theMouseEndX,
                             const Standard_Integer theMouseEndY)
 {
-  Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False);
+  const Standard_Boolean wasUpdateEnabled = myImmediateUpdate;
+  myImmediateUpdate = Standard_False;
 
   // zoom
   Standard_Real aDxy = Standard_Real ((theMouseEndX + theMouseEndY) - (theMouseStartX + theMouseStartY));
@@ -2459,7 +2463,7 @@ void V3d_View::ZoomAtPoint (const Standard_Integer theMouseStartX,
   aCamera->SetScale (aCamera->Scale() / aCoef);
   Translate (aCamera, aZoomAtPointXv - aDxv, aZoomAtPointYv - aDyv);
 
-  SetImmediateUpdate (wasUpdateEnabled);
+  myImmediateUpdate = wasUpdateEnabled;
 
   ImmediateUpdate();
 }
index 222fb18ef0892296daacb3db53ac1bb157664c3e..136ffa91e221e09f619b77669112f89d480d1550 100644 (file)
@@ -265,9 +265,6 @@ public:
   //! Returns TRUE when the light is active in this view.
   Standard_EXPORT Standard_Boolean IsActiveLight (const Handle(V3d_Light)& theLight) const;
 
-  //! sets the immediate update mode and returns the previous one.
-  Standard_EXPORT Standard_Boolean SetImmediateUpdate (const Standard_Boolean theImmediateUpdate);
-
   //! Returns trihedron object.
   const Handle(V3d_Trihedron)& Trihedron (bool theToCreate = true)
   {
@@ -948,6 +945,10 @@ public:
 
 public: //! @name deprecated methods
 
+  //! sets the immediate update mode and returns the previous one.
+  Standard_DEPRECATED ("Deprecated method - ImmediateUpdate will be removed")
+  Standard_EXPORT Standard_Boolean SetImmediateUpdate (const Standard_Boolean theImmediateUpdate);
+
   //! Returns True if One light more can be
   //! activated in this View.
   Standard_DEPRECATED ("Deprecated method - ActiveLights() should be used instead")
index ad6467fab4aaa21d4a55325b985f395f3f5b388f..f6e20e117993c6acf65ddab6cec514f636cf1f1b 100644 (file)
@@ -116,11 +116,13 @@ void V3d_Viewer::SetViewOn (const Handle(V3d_View)& theView)
     theView->SetGrid (myPrivilegedPlane, aGrid);
     theView->SetGridActivity (aGrid->IsActive());
   }
+Standard_DISABLE_DEPRECATION_WARNINGS
   if (theView->SetImmediateUpdate (Standard_False))
   {
     theView->Redraw();
     theView->SetImmediateUpdate (Standard_True);
   }
+Standard_ENABLE_DEPRECATION_WARNINGS
 }
 
 // ========================================================================
index acfb950601321e59eab97ca87d497270ed39cae1..7494d697139f3e96891b49c275c323e9f3ab90d9 100644 (file)
@@ -1199,7 +1199,9 @@ static Standard_Integer VDump (Draw_Interpretor& theDI,
     case Graphic3d_BT_Red:                 aFormat = Image_Format_Gray;  break;
   }
 
+Standard_DISABLE_DEPRECATION_WARNINGS
   const bool wasImmUpdate = aView->SetImmediateUpdate (false);
+Standard_ENABLE_DEPRECATION_WARNINGS
   Handle(Graphic3d_Camera) aCamBack = aView->Camera();
   if (!aCustomCam.IsNull())
   {
@@ -1277,7 +1279,9 @@ static Standard_Integer VDump (Draw_Interpretor& theDI,
   {
     aView->SetCamera (aCamBack);
   }
+Standard_DISABLE_DEPRECATION_WARNINGS
   aView->SetImmediateUpdate (wasImmUpdate);
+Standard_ENABLE_DEPRECATION_WARNINGS
 
   if (!aPixMap.Save (aFilePath))
   {
index 61f45871fad7561c3e1abe9f8122f4ba7aa712a9..25b3e7d2cdefdec58b7842bdb93fe9936bd49d94 100644 (file)
@@ -28,7 +28,9 @@ ViewerTest_AutoUpdater::ViewerTest_AutoUpdater (const Handle(AIS_InteractiveCont
 {
   if (!theView.IsNull())
   {
+  Standard_DISABLE_DEPRECATION_WARNINGS
     myWasAutoUpdate = theView->SetImmediateUpdate (Standard_False);
+  Standard_ENABLE_DEPRECATION_WARNINGS
   }
 }
 
@@ -74,7 +76,9 @@ void ViewerTest_AutoUpdater::Invalidate()
   if (myWasAutoUpdate
   && !myView.IsNull())
   {
+  Standard_DISABLE_DEPRECATION_WARNINGS
     myView->SetImmediateUpdate (myWasAutoUpdate);
+  Standard_ENABLE_DEPRECATION_WARNINGS
   }
 }
 
@@ -86,7 +90,9 @@ void ViewerTest_AutoUpdater::Update()
 {
   if (!myView.IsNull())
   {
+  Standard_DISABLE_DEPRECATION_WARNINGS
     myView->SetImmediateUpdate (myWasAutoUpdate);
+  Standard_ENABLE_DEPRECATION_WARNINGS
   }
 
   switch (myToUpdate)
@@ -96,13 +102,6 @@ void ViewerTest_AutoUpdater::Update()
       return;
     }
     case ViewerTest_AutoUpdater::RedrawMode_Auto:
-    {
-      if (!myWasAutoUpdate)
-      {
-        return;
-      }
-    }
-    Standard_FALLTHROUGH
     case ViewerTest_AutoUpdater::RedrawMode_Forced:
     {
       if (!myContext.IsNull())
index 7f4af794399c76e6e1cbffdcf809c7062ee6db8b..e728302d667a60ce561543e64f35e6133599e9dd 100644 (file)
@@ -925,7 +925,9 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI,
   {
     ViewerTest::ViewerInit (0, 0, anImgParams.Width, anImgParams.Height, "TmpDriver/TmpViewer/TmpView");
     aView = ViewerTest::CurrentView();
+  Standard_DISABLE_DEPRECATION_WARNINGS
     aView->SetImmediateUpdate (false);
+  Standard_ENABLE_DEPRECATION_WARNINGS
     aView->SetBgGradientStyle (Aspect_GradientFillMethod_None, false);
   }
 
@@ -964,7 +966,9 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI,
       const TCollection_AsciiString anImgPath = aFileNameBase + "_" + aColName + ".png";
       if (!aView.IsNull())
       {
+      Standard_DISABLE_DEPRECATION_WARNINGS
         aView->SetImmediateUpdate (false);
+      Standard_ENABLE_DEPRECATION_WARNINGS
         aView->SetBackgroundColor (aCol);
         if (!aView->ToPixMap (anImg, anImgParams)
          || !anImg.Save (aFolder + anImgPath))
index 9c5194ac71c19ed833990024b4ad2a6ee2234135..d0b30ce3d2acfbb7f8f74e4463818da439b030c5 100644 (file)
@@ -7645,7 +7645,9 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI,
   }
 
   // Perform video recording
+Standard_DISABLE_DEPRECATION_WARNINGS
   const Standard_Boolean wasImmediateUpdate = aView->SetImmediateUpdate (Standard_False);
+Standard_ENABLE_DEPRECATION_WARNINGS
   const Standard_Real anUpperPts = aPlayStartTime + aPlayDuration;
   anAnimation->StartTimer (aPlayStartTime, aPlaySpeed, Standard_True, aPlayDuration <= 0.0);
 
@@ -7736,7 +7738,9 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI,
         << "Nb. Frames: "  << Standard_Real(aNbFrames);
 
   aView->Redraw();
+Standard_DISABLE_DEPRECATION_WARNINGS
   aView->SetImmediateUpdate (wasImmediateUpdate);
+Standard_ENABLE_DEPRECATION_WARNINGS
   return 0;
 }
 
@@ -13159,7 +13163,9 @@ static int VDumpSelectionImage (Draw_Interpretor& /*theDi*/,
     return 1;
   }
 
+Standard_DISABLE_DEPRECATION_WARNINGS
   const bool wasImmUpdate = aView->SetImmediateUpdate (false);
+Standard_ENABLE_DEPRECATION_WARNINGS
   Handle(Graphic3d_Camera) aCamBack = aView->Camera();
   if (!aCustomCam.IsNull())
   {
@@ -13174,8 +13180,9 @@ static int VDumpSelectionImage (Draw_Interpretor& /*theDi*/,
   {
     aView->SetCamera (aCamBack);
   }
+Standard_DISABLE_DEPRECATION_WARNINGS
   aView->SetImmediateUpdate (wasImmUpdate);
-
+Standard_ENABLE_DEPRECATION_WARNINGS
   if (!aPixMap.Save (aFile))
   {
     Message::SendFail ("Error: can't save selection image");