+
+//********************************************************************
+bool ModuleBase_WidgetSelector::isWholeResultAllowed() const
+{
+ AttributePtr anAttribute = attribute();
+ if (anAttribute.get()) {
+ AttributeSelectionListPtr aSelAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(anAttribute);
+ if (aSelAttr.get())
+ return aSelAttr->isWholeResultAllowed();
+ }
+ return false;
+}
+
+bool getObjectFromGroup(ObjectPtr& theObject, GeomShapePtr& theShape)
+{
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
+
+ AttributeSelectionListPtr anAttrList = aFeature->selectionList("group_list");
+
+ for (int anIndex = 0; anIndex < anAttrList->size(); ++anIndex) {
+ AttributeSelectionPtr aSelect = anAttrList->value(anIndex);
+ if (aSelect->context()->shape()->isSubShape(theShape) ||
+ aSelect->context()->shape()->isEqual(theShape)) {
+ theObject = aSelect->contextObject();
+ return true;
+ }
+ }
+ return false;
+}
\ No newline at end of file