]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix bug of Dump visual state functionality - IParameter should be cleared in the...
authorvsr <vsr@opencascade.com>
Wed, 15 Feb 2012 11:22:09 +0000 (11:22 +0000)
committervsr <vsr@opencascade.com>
Wed, 15 Feb 2012 11:22:09 +0000 (11:22 +0000)
src/KERNEL_PY/iparameters.py
src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx

index dfa0df6ba2b826f5647d7d86d7ae7941f2153e67..b82036cddf8b16ec841222c6a35a3140e847d09a 100755 (executable)
@@ -76,13 +76,18 @@ class IParameters:
 
     Note:   
           Methods not mentioned above are private and is not supposed to be used
-          by module's developers.   
+          by module's developers.
        
     """
-    def __init__(self, attributeParameter):
-        """Initializes the instance"""
+    def __init__(self, attributeParameter, clr=False):
+        """Initializes the instance. If clr parameter is True, all IAPP attribute values are cleared."""
         self._ap = attributeParameter
+        if ( clr ): self.clear()
         pass
+       
+    def clear(self):
+        """Clear parameters"""
+       self._ap.Clear()
 
     def append(self, listName, value):
         """Appends a value to the named list"""
index 366f45469026bd9f247a09755faf9e5ee9a5b6ee..9f6534ccf131e39d9177ad27edee5c4e3c9bf0e8 100644 (file)
@@ -293,7 +293,7 @@ std::string SALOMEDSImpl_IParameters::getStudyScript(SALOMEDSImpl_Study* study,
   std::string dump("");
 
   dump += "import iparameters\n";
-  dump += "ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters(\""+anID+"\", 1))\n\n";
+  dump += "ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters(\""+anID+"\", 1), True)\n\n";
   
   
   std::vector<std::string> v = ip.getProperties();