From fca39760e413624def0d677805236ae88ac7fd23 Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 2 Jun 2015 10:48:19 +0300 Subject: [PATCH] refs #558, #552: take into account last changes in the list of predefined Z layers (namely top and bottom ids) --- src/HYDROGUI/HYDROGUI_ZLayers.cxx | 9 ++++++--- src/HYDROGUI/HYDROGUI_ZLayers2.cxx | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_ZLayers.cxx b/src/HYDROGUI/HYDROGUI_ZLayers.cxx index ac479434..0fe911d4 100644 --- a/src/HYDROGUI/HYDROGUI_ZLayers.cxx +++ b/src/HYDROGUI/HYDROGUI_ZLayers.cxx @@ -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; } diff --git a/src/HYDROGUI/HYDROGUI_ZLayers2.cxx b/src/HYDROGUI/HYDROGUI_ZLayers2.cxx index 1d59e75b..76bd41b0 100644 --- a/src/HYDROGUI/HYDROGUI_ZLayers2.cxx +++ b/src/HYDROGUI/HYDROGUI_ZLayers2.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include 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 ); -- 2.39.2