- NCollection_List<TopoDS_Shape>::Iterator anIt(theShapes);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aShape = anIt.Value();
- if (aShape.IsNull())
+ Handle(AIS_InteractiveContext) aContext = AISContext();
+ for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) {
+ Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
+ TopoDS_Shape aShape = aContext->SelectedShape();
+
+ boost::shared_ptr<ModelAPI_Feature> aFeature;
+ FeatureToAISMap::const_iterator aFIt = myFeature2AISObjectMap.begin(),
+ aFLast = myFeature2AISObjectMap.end();
+ for (; aFIt != aFLast && !aFeature; aFIt++) {
+ Handle(AIS_InteractiveObject) anAIS = (*aFIt).second;
+ if (anAIS != anIO)
+ continue;
+ aFeature = (*aFIt).first;
+ }
+ if (aPrsFeatures.find(aFeature) != aPrsFeatures.end())