]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetFeature.cpp
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFeature.cpp
index 6586a491a104783222dc1d23b58a43ffa35636c6..e1f8752dc30f221e5780fe12fa259921317b5de2 100644 (file)
@@ -137,10 +137,9 @@ bool ModuleBase_WidgetFeature::restoreValue()
   boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = boost::dynamic_pointer_cast<
       ModelAPI_AttributeRefAttr>(aData->attribute(attributeID()));
 
-  ObjectPtr aObj = aRef->object();
-  FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aRef->object());
-  if (aFeature) {
-    myObject = aFeature;
+  ObjectPtr anObjPtr = aRef->object();
+  if (anObjPtr) {
+    myObject = anObjPtr;
     myEditor->setText(myObject ? myObject->data()->name().c_str() : "");
     return true;
   }