]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #558, #552: take into account last changes in the list of predefined Z layers...
authormzn <mzn@opencascade.com>
Tue, 2 Jun 2015 07:48:19 +0000 (10:48 +0300)
committermzn <mzn@opencascade.com>
Tue, 2 Jun 2015 07:48:19 +0000 (10:48 +0300)
src/HYDROGUI/HYDROGUI_ZLayers.cxx
src/HYDROGUI/HYDROGUI_ZLayers2.cxx

index ac479434cafb04f231eb35d9a8c9053b4cedfd39..0fe911d488f0c16f487867dbcf95a4674bd53326 100644 (file)
@@ -93,9 +93,12 @@ void HYDROGUI_ZLayersIterator::Init( const Handle_V3d_Viewer& theViewer )
   theViewer->GetAllZLayers( anExistingZLayers );
   
   int n = anExistingZLayers.Length();
-  myZLayers.resize( n );
-  for( int i=1; i<=n; i++ )
-    myZLayers[i-1] = anExistingZLayers( i );
+  for( int i=1; i<=n; i++ ) {
+    int aLayerId = anExistingZLayers( i );
+    if ( aLayerId >= 0 ) {
+      myZLayers.push_back( aLayerId );
+    }
+  }
 
   myIndex = 0;
 }
index 1d59e75b274ac62d033273e8b9789b817e0ac4e8..76bd41b06414b7c0802b1b98727aaf4775d4a6a0 100644 (file)
@@ -21,6 +21,7 @@
 #include <AIS_InteractiveObject.hxx>
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
+#include <AIS_Trihedron.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 
 void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle_AIS_InteractiveContext& theContext,
@@ -33,7 +34,7 @@ void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle_AIS_Int
   for ( ; aListIter.More(); aListIter.Next() )
   {
     Handle(AIS_InteractiveObject) aPrsObj = aListIter.Value();
-    if( !aPrsObj.IsNull() )
+    if( !aPrsObj.IsNull() && !aPrsObj->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
     {
       int aMode = aPrsObj->HasHilightMode() ? aPrsObj->HilightMode() : 0;
       theContext->MainPrsMgr()->Color( aPrsObj, Quantity_NOC_YELLOW, aMode );