diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index aaf1b2da15..e5b69f6449 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -384,7 +384,6 @@ void V3d_View::UpdateLights() const aLights.Append (anActiveLightIter.Value()->Light()); } myView->SetLights (aLights); - Update(); } //============================================================================= diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 5f8d860862..efe8e5b101 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -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. diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 4c7f7f2138..37900c1e24 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -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"))