X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetFeatureOrAttribute.cpp;h=633adbc439e22e36df7a632acd878b5fd734b47d;hb=871d21cd6e0ab86c79867145cb90a7e9dd7cd830;hp=a26a70d0ac81c569af8b5c72af442f1b1fe28e47;hpb=6929ae64e2dec9ba0a969f646c9d0d719da2ee8a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp b/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp index a26a70d0a..633adbc43 100644 --- a/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -29,8 +29,9 @@ #include ModuleBase_WidgetFeatureOrAttribute::ModuleBase_WidgetFeatureOrAttribute(QWidget* theParent, - const Config_WidgetAPI* theData) -: ModuleBase_WidgetFeature(theParent, theData) + const Config_WidgetAPI* theData, + const std::string& theParentId) +: ModuleBase_WidgetFeature(theParent, theData, theParentId) { } @@ -47,10 +48,9 @@ bool ModuleBase_WidgetFeatureOrAttribute::setValue(ModuleBase_WidgetValue* theVa dynamic_cast(theValue); if (aFeatureValue) { boost::shared_ptr aValuePoint = aFeatureValue->point(); - //TODO -/* FeaturePtr aValueFeature = aFeatureValue->feature(); + ObjectPtr aValueFeature = aFeatureValue->object(); if (aValueFeature) { - isDone = setFeature(aValueFeature); + isDone = setObject(aValueFeature); } if (!isDone && aValuePoint) { // find the given point in the feature attributes @@ -67,7 +67,7 @@ bool ModuleBase_WidgetFeatureOrAttribute::setValue(ModuleBase_WidgetValue* theVa } if (aFPoint) isDone = setAttribute(aFPoint); - }*/ + } } } return isDone; @@ -80,8 +80,8 @@ bool ModuleBase_WidgetFeatureOrAttribute::storeValue(FeaturePtr theFeature) cons boost::dynamic_pointer_cast(aData->attribute(attributeID())); ModuleBase_WidgetFeatureOrAttribute* that = (ModuleBase_WidgetFeatureOrAttribute*) this; - if (feature()) - aRef->setObject(feature()); + if (object()) + aRef->setObject(object()); else if (myAttribute) aRef->setAttr(myAttribute); @@ -99,7 +99,7 @@ bool ModuleBase_WidgetFeatureOrAttribute::restoreValue(FeaturePtr theFeature) FeaturePtr aFeature = boost::dynamic_pointer_cast(aRef->object()); if (aFeature) { - setFeature(aFeature); + setObject(aFeature); myAttribute = aRef->attr(); std::string aText = "";