]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Modified method DumpPython
authorsrn <srn@opencascade.com>
Fri, 10 Feb 2006 11:08:18 +0000 (11:08 +0000)
committersrn <srn@opencascade.com>
Fri, 10 Feb 2006 11:08:18 +0000 (11:08 +0000)
src/VISU_I/VISU_DumpPython.cc

index 88d79f7df472940b070fa3629c36d2f035e0fa24..67296b9dbf1f8d3bbd771163b6871811d746c5a9 100644 (file)
@@ -1175,9 +1175,11 @@ namespace VISU{
     VISU::DumpContainersToPython(aStudy,theIsPublished,theIsValidScript,aComponent.in(),aStr,aName2EntryMap,aEntry2NameMap,"",aPrefix);
 
     //Output the script that sets up the visul parameters.
-    _PTR(Study) study(new SALOMEDS_Study(aStudy));
-    string defScript = SALOMEDS_IParameters::getDefaultScript(study, "Interface Applicative", "Post-Pro", aPrefix);
-    if(defScript != "") aStr << defScript;
+    if(theIsPublished) {
+      _PTR(Study) study(new SALOMEDS_Study(aStudy));
+      string defScript = SALOMEDS_IParameters::getDefaultScript(study, "Interface Applicative", "Post-Pro", aPrefix);
+      if(defScript != "") aStr << defScript;
+    }
 
     aStr<<aPrefix<<"pass"<<endl;