Salome HOME
Issue #358: Prevent crashes on operations when viewer is absent
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationDescription.cpp
index ffffe6922f00a1db053f1977304e176cdd7fec70..04d5cc4a01f0371787b3c14da7cff60f06d1a2f5 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 /*
  * ModuleBase_OperationDescription.cpp
  *
@@ -9,7 +11,7 @@
 #include <QString>
 
 ModuleBase_OperationDescription::ModuleBase_OperationDescription(const QString& theId)
-: myOperationId(theId)
+    : myOperationId(theId)
 {
 }
 
@@ -33,19 +35,19 @@ void ModuleBase_OperationDescription::setDescription(const QString& theDescripti
 }
 
 /*void ModuleBase_OperationDescription::setModelWidgets(const std::string& theXmlRepresentation,
                                                     const QList<ModuleBase_ModelWidget*>& theWidgets)
-{
 myWidgets.clear();
 QList<ModuleBase_ModelWidget*>::const_iterator anIt = theWidgets.begin(), aLast = theWidgets.end();
 for (; anIt != aLast; anIt++)
   myWidgets.push_back(*anIt);
 myXmlRepresentation = theXmlRepresentation;
-}*/
+ const QList<ModuleBase_ModelWidget*>& theWidgets)
+ {
+ myWidgets.clear();
+ QList<ModuleBase_ModelWidget*>::const_iterator anIt = theWidgets.begin(), aLast = theWidgets.end();
+ for (; anIt != aLast; anIt++)
+ myWidgets.push_back(*anIt);
+ myXmlRepresentation = theXmlRepresentation;
+ }*/
 
 /*const QList<ModuleBase_ModelWidget*>& ModuleBase_OperationDescription::modelWidgets() const
-{
 return myWidgets;
-}*/
+ {
+ return myWidgets;
+ }*/
 
 const QString& ModuleBase_OperationDescription::xmlRepresentation() const
 {