Salome HOME
Separation of Construction plugin from PartSet plugin. Each plugin package contains...
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Plugin.cxx
index 7992ef085bb86ed6fcc48b299938d516cc2db310..83e9bc421b138ab498c27d627d8bcc4f897aecb5 100644 (file)
@@ -15,28 +15,11 @@ PartSetPlugin_Plugin::PartSetPlugin_Plugin()
   ModelAPI_PluginManager::get()->registerPlugin(this);
 }
 
-std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Plugin::createFeature(
-  string theFeatureID, const bool theAddToDoc)
+shared_ptr<ModelAPI_Feature> PartSetPlugin_Plugin::createFeature(string theFeatureID)
 {
-  std::shared_ptr<ModelAPI_Feature> aCreated;
-  bool isCurrent = true; // to create a feature in the current document
-  std::string aGroup;
   if (theFeatureID == "Part") {
-    aCreated = std::shared_ptr<ModelAPI_Feature>(new PartSetPlugin_Part);
-    isCurrent = false; // allways create in the root document
-    aGroup = PARTS_GROUP;
-  } else if (theFeatureID == "Point") {
-    aCreated = std::shared_ptr<ModelAPI_Feature>(new PartSetPlugin_Point);
-    aGroup = CONSTRUCTIONS_GROUP;
-  }
-
-  // add to a root document for the current moment
-  if (aCreated && theAddToDoc) {
-    shared_ptr<ModelAPI_Document> aDoc = isCurrent ? 
-      ModelAPI_PluginManager::get()->currentDocument() :
-      ModelAPI_PluginManager::get()->rootDocument();
-    aDoc->addFeature(aCreated, aGroup);
+    return shared_ptr<ModelAPI_Feature>(new PartSetPlugin_Part);
   }
   // feature of such kind is not found
-  return aCreated;
+  return shared_ptr<ModelAPI_Feature>();
 }