Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Duplicate.cpp
index 726f6487b7a1d8810b02219b4885fb3efd9669aa..d1032abf8a29e9c792adbb9cb842f903923c093f 100644 (file)
@@ -26,15 +26,15 @@ void PartSetPlugin_Duplicate::initAttributes()
     boost::shared_ptr<PartSetPlugin_Part> aSource; // searching for source document attribute
     for(int a = aRoot->size(getGroup()) - 1; a >= 0; a--) {
       aSource = boost::dynamic_pointer_cast<PartSetPlugin_Part>(
-        aRoot->feature(getGroup(), a, true));
+        aRoot->object(ModelAPI_Feature::group(), a));
       if (aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value() == aPManager->currentDocument())
         break;
       aSource.reset();
     }
     if (aSource) {
       boost::shared_ptr<ModelAPI_Document> aCopy = 
-        aPManager->copy(aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value(), data()->getName());
-      aRef->setFeature(aSource);
+        aPManager->copy(aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value(), data()->name());
+      aRef->setObject(aSource);
     }
   }
 }