-//********************************************************************
-bool ModuleBase_WidgetMultiSelector::setSelectionCustom(const ModuleBase_ViewerPrs& thePrs)
-{
- //TopoDS_Shape aShape = thePrs.shape();
- //if (!acceptSubShape(aShape))
- // return false;
-
- ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
- /*
- if (myFeature) {
- // We can not select a result of our feature
- const std::list<ResultPtr>& aResList = myFeature->results();
- std::list<ResultPtr>::const_iterator aIt;
- bool isSkipSelf = false;
- for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) {
- if ((*aIt) == aResult) {
- isSkipSelf = true;
- break;
- }
- }
- if(isSkipSelf)
- return false;
- }*/
-
- // if the result has the similar shap as the parameter shape, just the context is set to the
- // selection list attribute.
- DataPtr aData = myFeature->data();
- AttributeSelectionListPtr aSelectionListAttr =
- std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
-
- /*const TopoDS_Shape& aTDSShape = thePrs.shape();
- // if only result is selected, an empty shape is set to the model
- if (aTDSShape.IsNull()) {
- aSelectionListAttr->append(aResult, GeomShapePtr());
- }
- else {
- GeomShapePtr aShape(new GeomAPI_Shape());
- aShape->setImpl(new TopoDS_Shape(aTDSShape));
- // We can not select a result of our feature
- if (aShape->isEqual(aResult->shape()))
- aSelectionListAttr->append(aResult, GeomShapePtr());
- else
- aSelectionListAttr->append(aResult, aShape);
- }*/
- GeomShapePtr aShape = myWorkshop->selection()->getShape(thePrs);
- aSelectionListAttr->append(aResult, aShape);
-
- return true;
-}
-