From: rnv Date: Thu, 25 Aug 2016 09:18:04 +0000 (+0300) Subject: Fix for the '53126: Salome application crashes after 'Update Study' in NoteBook windo... X-Git-Tag: V8_1_0rc1~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fdb9bea75d07f5c8deeefe17419085c9adf8e21f;p=modules%2Fgui.git Fix for the '53126: Salome application crashes after 'Update Study' in NoteBook window' issue. --- 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;