]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for the '53126: Salome application crashes after 'Update Study' in NoteBook windo...
authorrnv <rnv@opencascade.com>
Thu, 25 Aug 2016 09:18:04 +0000 (12:18 +0300)
committerrnv <rnv@opencascade.com>
Thu, 25 Aug 2016 09:18:04 +0000 (12:18 +0300)
src/OCCViewer/OCCViewer_ViewWindow.cxx

index 7a1ae0797ede1ae6bd2a80aa666fca2df53c8d7d..3e5830b39d1b018c5bd07fad1ddc1332f09b3944 100644 (file)
@@ -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;