From: mzn Date: Tue, 2 Jun 2015 07:48:19 +0000 (+0300) Subject: refs #558, #552: take into account last changes in the list of predefined Z layers... X-Git-Tag: v1.4.1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fca39760e413624def0d677805236ae88ac7fd23;p=modules%2Fhydro.git refs #558, #552: take into account last changes in the list of predefined Z layers (namely top and bottom ids) --- 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 );