const int theMode, const int theLayerId )
{
PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
const int theMode, const int theLayerId )
{
PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
{
TColStd_SequenceOfInteger anExistingZLayers;
theViewer->GetAllZLayers( anExistingZLayers );
int n = anExistingZLayers.Length();
{
TColStd_SequenceOfInteger anExistingZLayers;
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 );
+ }
+ }