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;
}
#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,
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 );