Salome HOME
#1186 misprint “Origin/PointCoordindates”. The correction: using 'title' or 'label...
[modules/shaper.git] / src / ModuleBase / ModuleBase_IModule.cpp
index a4fb017577a7bc20c8d46fd5d92e489cdc418fa6..4d89489a42166c11a8b513d186ba93a888db56c1 100644 (file)
@@ -81,7 +81,9 @@ ModuleBase_Operation* ModuleBase_IModule::getNewOperation(const std::string& the
   return new ModuleBase_OperationFeature(theFeatureId.c_str(), this);
 }
 
-bool ModuleBase_IModule::customizeObject(ObjectPtr theObject, const bool theUpdateViewer)
+bool ModuleBase_IModule::customizeObject(ObjectPtr theObject,
+                                         const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag,
+                                         const bool theUpdateViewer)
 {
   return false;
 }
@@ -103,12 +105,8 @@ ModuleBase_Operation* ModuleBase_IModule::createOperation(const std::string& the
     }
   }
 
-  std::string aPluginFileName = myFeaturesInFiles[theFeatureId];
-  Config_WidgetReader aWdgReader = Config_WidgetReader(aPluginFileName);
-  aWdgReader.readAll();
-  std::string aXmlCfg = aWdgReader.featureWidgetCfg(theFeatureId);
-  std::string aDescription = aWdgReader.featureDescription(theFeatureId);
-
+  std::string aXmlCfg, aDescription;
+  getXMLRepresentation(theFeatureId, aXmlCfg, aDescription);
   aFOperation->getDescription()->setDescription(QString::fromStdString(aDescription));
   aFOperation->getDescription()->setXmlRepresentation(QString::fromStdString(aXmlCfg));
 
@@ -198,3 +196,14 @@ void ModuleBase_IModule::operationResumed(ModuleBase_Operation* theOperation)
 {
   emit resumed(theOperation);
 }
+
+void ModuleBase_IModule::getXMLRepresentation(const std::string& theFeatureId,
+                                              std::string& theXmlCfg, std::string& theDescription)
+{
+  std::string aPluginFileName = myFeaturesInFiles[theFeatureId];
+  Config_WidgetReader aWdgReader = Config_WidgetReader(aPluginFileName);
+  aWdgReader.readAll();
+
+  theXmlCfg = aWdgReader.featureWidgetCfg(theFeatureId);
+  theDescription = aWdgReader.featureDescription(theFeatureId);
+}