0029285: Visualization, V3d_View::UpdateLights() - eliminate implicit redraw
authorkgv <kgv@opencascade.com>
Thu, 2 Nov 2017 07:04:39 +0000 (10:04 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 8 Nov 2017 13:42:01 +0000 (16:42 +0300)
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx

index aaf1b2d..e5b69f6 100644 (file)
@@ -384,7 +384,6 @@ void V3d_View::UpdateLights() const
     aLights.Append (anActiveLightIter.Value()->Light());
   }
   myView->SetLights (aLights);
-  Update();
 }
 
 //=============================================================================
index 5f8d860..efe8e5b 100644 (file)
@@ -169,7 +169,7 @@ public:
   //! Returns True is The View is empty
   Standard_EXPORT Standard_Boolean IsEmpty() const;
 
-  //! Updates the lights of the view. The view is redrawn.
+  //! Updates the lights of the view.
   Standard_EXPORT void UpdateLights() const;
 
   //! Sets the automatic z-fit mode and its parameters.
index 4c7f7f2..37900c1 100644 (file)
@@ -9318,6 +9318,7 @@ static int VLight (Draw_Interpretor& theDi,
   Handle(V3d_Light) aLightOld;
   Standard_Boolean  isGlobal = Standard_True;
   Standard_Boolean  toCreate = Standard_False;
+  ViewerTest_AutoUpdater anUpdateTool (ViewerTest::GetAISContext(), aView);
   for (Standard_Integer anArgIt = 1; anArgIt < theArgsNb; ++anArgIt)
   {
     Handle(V3d_Light)            aLightCurr = aLightNew.IsNull() ? aLightOld : aLightNew;
@@ -9330,6 +9331,11 @@ static int VLight (Draw_Interpretor& theDi,
     const TCollection_AsciiString anArg (theArgVec[anArgIt]);
     TCollection_AsciiString anArgCase (anArg);
     anArgCase.UpperCase();
+    if (anUpdateTool.parseRedrawMode (anArg))
+    {
+      continue;
+    }
+
     if (anArgCase.IsEqual ("NEW")
      || anArgCase.IsEqual ("ADD")
      || anArgCase.IsEqual ("CREATE"))