]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
#19732 [CEA] SIGSEGV with synchronized OCC and VTK views fixes_for_950 V9_5_0 V9_5_0rc3
authorRoman NIKOLAEV <roman.nikolaev@opencascade.com>
Thu, 25 Jun 2020 10:25:16 +0000 (13:25 +0300)
committerRoman NIKOLAEV <roman.nikolaev@opencascade.com>
Thu, 25 Jun 2020 10:25:16 +0000 (13:25 +0300)
src/OCCViewer/OCCViewer_ViewWindow.cxx

index da790e08159ccd07005d8ac7360d087815ae033d..dfe13c2bc396f72bb4bc847d2928723ba1a16a50 100644 (file)
@@ -97,6 +97,7 @@
 #include <Image_PixMap.hxx>
 
 #include <Standard_Version.hxx>
+#include <Standard_Failure.hxx>
 
 #include "utilities.h"
 
@@ -3662,15 +3663,19 @@ void OCCViewer_ViewWindow::synchronize( SUIT_ViewWindow* theView )
   aProps.getPosition( aPosition[0], aPosition[1], aPosition[2] );
   aProps.getViewUp( anUpDir[0], anUpDir[1], anUpDir[2] );
   aProps.getAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );
-
-  aDestView->SetAt( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );
-  aDestView->SetEye( aPosition[0], aPosition[1], aPosition[2] );
-  aDestView->SetUp( anUpDir[0], anUpDir[1], anUpDir[2] );
-  aDestView->Camera()->SetScale( aProps.getMappingScale() );
-
-  getViewPort()->setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );
-  aDestView->SetImmediateUpdate( Standard_True );
-  aDestView->Redraw();
+  
+  try {
+    aDestView->SetAt( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );
+    aDestView->SetEye( aPosition[0], aPosition[1], aPosition[2] );
+    aDestView->SetUp( anUpDir[0], anUpDir[1], anUpDir[2] );
+    aDestView->Camera()->SetScale( aProps.getMappingScale() );
+
+    getViewPort()->setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );
+    aDestView->SetImmediateUpdate( Standard_True );
+    aDestView->Redraw();
+  } 
+  catch (Standard_Failure) {
+  }
 
   blockSignals( blocked );
 }