Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Remove.cpp
index 2aea700f2a61f4a3e0fdaad6f2d9e485f20dee29..ca31737285e7b2c7b83ad9342b57fe4a7d2db1c9 100644 (file)
@@ -15,7 +15,8 @@ void PartSetPlugin_Remove::execute()
   boost::shared_ptr<ModelAPI_Document> aCurrent;
   boost::shared_ptr<PartSetPlugin_Part> a;
   for(int a = aRoot->size(getGroup()) - 1; a >= 0; a--) {
-    FeaturePtr aFeature = aRoot->feature(getGroup(), a, true);
+    FeaturePtr aFeature = 
+      boost::dynamic_pointer_cast<ModelAPI_Feature>(aRoot->object(ModelAPI_Feature::group(), a));
     if (aFeature->getKind() == PartSetPlugin_Part::ID()) {
       boost::shared_ptr<PartSetPlugin_Part> aPart = 
         boost::static_pointer_cast<PartSetPlugin_Part>(aFeature);