]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
bug in GUI calculation case or complete case: Graphic3D_GraphicDriver::insertLayerBef...
authorPaul RASCLE <paul.rascle@openfields.fr>
Sun, 27 Sep 2020 18:06:41 +0000 (20:06 +0200)
committerYOANN AUDOUIN <B61570@dsp0851742.postes.calibre.edf.fr>
Fri, 30 Oct 2020 16:08:45 +0000 (17:08 +0100)
src/HYDROGUI/HYDROGUI_ZLayers.cxx

index 1d7ca6677c109ee8ee8497a9d48b24db48587810..d3aa9fc83253935594f35fca8b8890501b7c5e12 100644 (file)
@@ -20,6 +20,7 @@
 #include <PrsMgr_PresentableObject.hxx>
 #include <PrsMgr_Presentations.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
+#include <Graphic3d_ZLayerId.hxx>
 
 void SetZLayerForPrs( const Handle(PrsMgr_Presentation)& thePrs, int theLayerId );
 
@@ -67,10 +68,10 @@ void SetZLayerSettings( const Handle(V3d_Viewer)& theViewer3d, int theLayerId, b
 
 int CreateTopZLayer( const Handle(V3d_Viewer)& theViewer3d )
 {
-  int aTopZLayer = -1;
+  int aTopZLayer = Graphic3d_ZLayerId_Top;
 
   if ( theViewer3d && !theViewer3d->AddZLayer( aTopZLayer ) ) {
-    aTopZLayer = -1;
+    aTopZLayer = Graphic3d_ZLayerId_Top;
   }
 
   return aTopZLayer;
@@ -78,7 +79,7 @@ int CreateTopZLayer( const Handle(V3d_Viewer)& theViewer3d )
 
 
 HYDROGUI_ZLayersIterator::HYDROGUI_ZLayersIterator( const Handle(V3d_Viewer)& theViewer )
-  : myIndex( 0 ), myNewZLayer( -1 ), myViewer( theViewer )
+  : myIndex( 0 ), myNewZLayer( Graphic3d_ZLayerId_Top ), myViewer( theViewer )
 {
   Init( theViewer );
 }
@@ -120,7 +121,7 @@ void HYDROGUI_ZLayersIterator::Next()
 
 int HYDROGUI_ZLayersIterator::TopLayer() const
 {
-  int aTopLayer = -1;
+  int aTopLayer = Graphic3d_ZLayerId_Top;
 
   if ( myNewZLayer >= 0 ) {
     aTopLayer = myNewZLayer;