From fdb9bea75d07f5c8deeefe17419085c9adf8e21f Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 25 Aug 2016 12:18:04 +0300 Subject: [PATCH] Fix for the '53126: Salome application crashes after 'Update Study' in NoteBook window' issue. --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 7a1ae0797..3e5830b39 100644 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -2796,9 +2796,12 @@ void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters ) while ( myModel->getViewer3d()->MoreDefinedLights() ) { Handle(V3d_Light) aLight = myModel->getViewer3d()->DefinedLight(); - if( aLight->Type() != V3d_AMBIENT ) + if( aLight->Type() != V3d_AMBIENT ) { myModel->getViewer3d()->DelLight( aLight ); - myModel->getViewer3d()->NextDefinedLights(); + myModel->getViewer3d()->InitDefinedLights(); + } else { + myModel->getViewer3d()->NextDefinedLights(); + } } double aX, aY, aZ; double cR, cG, cB; -- 2.39.2