]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on - Bug 8779
authorapo <apo@opencascade.com>
Fri, 13 May 2005 10:44:39 +0000 (10:44 +0000)
committerapo <apo@opencascade.com>
Fri, 13 May 2005 10:44:39 +0000 (10:44 +0000)
  View Parameters not restored after Dump study

src/VISU_I/VISU_DumpPython.cc

index d1c66473ea38e173febc9b82def1b8d9d09fffae..491de818c6016ebaa313eeee3e71c332fd08b0ec 100644 (file)
@@ -263,6 +263,7 @@ namespace VISU{
     }
 
     std::string aSObjectName = GetName(theSObject);
+    theStr<<thePrefix<<"aSComponent = theStudy.FindComponent('VISU')"<<endl;
     theStr<<thePrefix<<aSObjectName<<" = aBuilder.NewObject(aSComponent)"<<endl;
     theStr<<thePrefix<<"if "<<aSObjectName<<":"<<endl;
     thePrefix += PREFIX;
@@ -409,40 +410,6 @@ namespace VISU{
   }
 
 
-  //===========================================================================
-  void
-  NewSObjectDumpToPython(SALOMEDS::Study_ptr theStudy,
-                        CORBA::Boolean theIsPublished,
-                        CORBA::Boolean& theIsValidScript,
-                        SALOMEDS::SObject_ptr theSObject,
-                        TDumpToPython theDumpToPython,
-                        std::ostream& theStr,
-                        TName2EntryMap& theName2EntryMap,
-                        TEntry2NameMap& theEntry2NameMap,
-                        std::string theArgumentName,
-                        std::string thePrefix)
-  {
-    SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder();
-    std::string aName = GenerateName(theSObject,theName2EntryMap,theEntry2NameMap);
-    theStr<<thePrefix<<theArgumentName<<" = aBuilder.NewObject(aSComponent)"<<endl;
-    theStr<<thePrefix<<"if "<<theArgumentName<<":"<<endl;
-    thePrefix += PREFIX;
-    
-    (*theDumpToPython)(theStudy,
-                      theIsPublished,
-                      theIsValidScript,
-                      theSObject,
-                      theStr,
-                      theName2EntryMap,
-                      theEntry2NameMap,
-                      theArgumentName,
-                      thePrefix);
-    
-    theStr<<thePrefix<<"pass"<<endl<<endl;
-    return;
-  }
-
-
   //===========================================================================
   void
   DumpToPython(SALOMEDS::Study_ptr theStudy,
@@ -1021,6 +988,7 @@ namespace VISU{
            }
          }else if(strcmp(aTypeName.latin1(),"VIEW3D") == 0){
            std::string aName = GetName(theSObject);
+           theStr<<thePrefix<<"aSComponent = theStudy.FindComponent('VISU')"<<endl;
            theStr<<thePrefix<<aName<<" = aBuilder.NewObject(aSComponent)"<<endl;
 
            theStr<<thePrefix<<"if "<<aName<<":"<<endl;
@@ -1171,7 +1139,6 @@ namespace VISU{
     aStr<<endl;
     aStr<<aPrefix<<"aVisu = visu.Initialize(orb,naming_service,lcc,myStudyManager,theStudy,0)"<<endl;
     aStr<<aPrefix<<"aMed = lcc.FindOrLoadComponent('FactoryServer','MED')"<<endl;
-    aStr<<aPrefix<<"aSComponent = theStudy.FindComponent('VISU')"<<endl;
     aStr<<aPrefix<<"aBuilder = theStudy.NewBuilder()"<<endl;
     aStr<<aPrefix<<"aName2ObjectMap = {}"<<endl;
     aStr<<endl;