From: vsv Date: Fri, 28 Nov 2014 12:09:05 +0000 (+0300) Subject: Provide shape selector with possibility to work with AttributeRefAttrPtr X-Git-Tag: V_0.6.0^2~51 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d44d8df10835d69a2616b426a8529fcf5555c9cd;p=modules%2Fshaper.git Provide shape selector with possibility to work with AttributeRefAttrPtr --- diff --git a/src/Model/Model_FeatureValidator.cpp b/src/Model/Model_FeatureValidator.cpp index 9f3ab4a13..b34f03edd 100644 --- a/src/Model/Model_FeatureValidator.cpp +++ b/src/Model/Model_FeatureValidator.cpp @@ -26,10 +26,10 @@ bool Model_FeatureValidator::isValid(const std::shared_ptr& th std::list::iterator it = aLtAttributes.begin(); for (; it != aLtAttributes.end(); it++) { AttributePtr anAttr = aData->attribute(*it); - if (!anAttr->isInitialized()) { + if (!anAttr->isInitialized()) { // attribute is not initialized std::map >::const_iterator aFeatureFind = myNotObligatory.find(theFeature->getKind()); - if (aFeatureFind == myNotObligatory.end() || + if (aFeatureFind == myNotObligatory.end() || // and it is obligatory for filling aFeatureFind->second.find(*it) == aFeatureFind->second.end()) { return false; } diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 0f1f10064..12cb98980 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -139,6 +139,11 @@ bool ModuleBase_WidgetShapeSelector::storeValue() const std::dynamic_pointer_cast(aAttr); if (aSelectAttr) aSelectAttr->setValue(aBody, myShape); + else { + AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID()); + if (aRefAttr) + aRefAttr->setObject(mySelectedObject); + } updateObject(myFeature); return true; }