CCAR: problem with an endless loop in getAIS

This commit is contained in:
caremoli 2011-01-05 14:29:52 +00:00
parent 10e23ee67f
commit 08ccaeae90
2 changed files with 69 additions and 66 deletions

View File

@ -395,7 +395,7 @@ Handle(AIS_InteractiveObject) GEOMBase::GetAIS( const Handle(SALOME_InteractiveO
anIC->ObjectsInCollector( displayed );
AIS_ListIteratorOfListOfInteractive it( displayed );
while ( it.More() && aisObject.IsNull() ) {
for ( ; it.More(); it.Next() ){
if ( onlyGeom && !it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) )
continue;
@ -403,7 +403,10 @@ Handle(AIS_InteractiveObject) GEOMBase::GetAIS( const Handle(SALOME_InteractiveO
Handle(SALOME_InteractiveObject)::DownCast( it.Value()->GetOwner() );
if ( !obj.IsNull() && obj->isSame( IO ) )
{
aisObject = it.Value();
break;
}
}
}
if ( !aisObject.IsNull() ) break;

View File

@ -383,8 +383,8 @@ void GEOMToolsGUI::OnColor()
anObject->SetColor( aSColor );
anObject->SetAutoColor( false );
}
} // for
GeometryGUI::Modified();
}
} // if c.isValid()
} // first IO is not null
} // if ( isOCC )