]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Still an error on ZLayers related to edit CalculationCase The call to createViewManag...
authorPaul RASCLE <paul.rascle@openfields.fr>
Sat, 14 Nov 2020 22:21:46 +0000 (23:21 +0100)
committerYOANN AUDOUIN <B61570@dsp0919998.atlas.edf.fr>
Fri, 4 Dec 2020 10:01:08 +0000 (11:01 +0100)
src/HYDROGUI/HYDROGUI_ZLayers.cxx

index d44736bd7715541c1c1b2fd33de0b2088518cb27..fe1f1d458ceee6b60184eeda019b1377dbe5c045 100644 (file)
@@ -74,9 +74,18 @@ int CreateTopZLayer( const Handle(V3d_Viewer)& theViewer3d )
   DEBTRACE("CreateTopZLayer");
   int aTopZLayer = Graphic3d_ZLayerId_Top;
 
-  if ( theViewer3d && !theViewer3d->AddZLayer( aTopZLayer ) ) {
-    aTopZLayer = Graphic3d_ZLayerId_Top;
-  }
+  if ( theViewer3d ) //&& !theViewer3d->AddZLayer( aTopZLayer ) ) {
+    {
+      try
+      {
+         theViewer3d->AddZLayer( aTopZLayer );
+      }
+      catch (...)
+      {
+        DEBTRACE("Add ZLayer not possible");
+        aTopZLayer = Graphic3d_ZLayerId_Top;
+      }
+    }
   DEBTRACE("  aTopZLayer: " << aTopZLayer);
   return aTopZLayer;
 }