- if (aResultPrs->hasSubShapeVisible(ModuleBase_Tools::getSelectedShape(aPrs)) ||
- useTransparency()) // redisplay
- ModelAPI_EventCreator::get()->sendUpdated(anObject, aDispEvent);
- else { // erase object because it is entirely hidden
+ if (anObjectToShapes.find(anObject) != anObjectToShapes.end())
+ anObjectToShapes.at(anObject).Append(ModuleBase_Tools::getSelectedShape(aPrs));
+ else {
+ NCollection_List<TopoDS_Shape> aListOfShapes;
+ aListOfShapes.Append(ModuleBase_Tools::getSelectedShape(aPrs));
+ anObjectToShapes[anObject] = aListOfShapes;
+ anObjectToPrs[anObject] = aResultPrs;
+ }
+ }
+ for (std::map<ObjectPtr, NCollection_List<TopoDS_Shape> >::const_iterator
+ anIt = anObjectToShapes.begin(); anIt != anObjectToShapes.end(); anIt++) {
+ ObjectPtr anObject = anIt->first;
+ if (!anObject.get() || anObjectToPrs.find(anObject) == anObjectToPrs.end())
+ continue;
+ Handle(ModuleBase_ResultPrs) aResultPrs = anObjectToPrs.at(anObject);
+
+ if (!aResultPrs->hasSubShapeVisible(anIt->second)) { // redisplay
+ // erase object because it is entirely hidden