]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
modified method DumpStudy
authorsrn <srn@opencascade.com>
Tue, 7 Feb 2006 10:23:39 +0000 (10:23 +0000)
committersrn <srn@opencascade.com>
Tue, 7 Feb 2006 10:23:39 +0000 (10:23 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h

index e4e0d9f9d99d6adf222476b4dc63d104ceb824a5..916996954f645b260e6eca92d2a101ee9d0aa2a7 100644 (file)
@@ -488,7 +488,9 @@ void SalomeApp_Application::onDumpStudy( )
 
   if(!aFileName.isEmpty()) {
     QFileInfo aFileInfo(aFileName);
-    bool res = aStudy->DumpStudy( aFileInfo.dirPath( true ).latin1(), aFileInfo.baseName().latin1(), toPublish );
+    int savePoint = appStudy->storeState(); //SRN: Store a visual state of the save at the save point
+    QString prefix = appStudy->getVisulDump(savePoint); //SRN: Get a generate Python script for the study's visual state
+    bool res = aStudy->DumpStudy( aFileInfo.dirPath( true ).latin1(), aFileInfo.baseName().latin1(), toPublish ,prefix.latin1());
     if ( !res )
     SUIT_MessageBox::warn1 ( desktop(),
                             QObject::tr("WRN_WARNING"),
index 9e07bf9565259e9c8b48a38448d8af9448c37ca6..4233e598ab48e3a13c3e1c105b6fee93d2d58c71 100644 (file)
@@ -814,7 +814,7 @@ void SalomeApp_Study::restoreState(int savePoint)
       continue;
     }
 
-     //Resize the views, set their captions and apply visual parameters.
+    //Resize the views, set their captions and apply visual parameters.
     QPtrVector<SUIT_ViewWindow> views = vm->getViews();  
     for(int i = 0, j = 0; i<viewCount; i++, j+=1) {
       viewWin = views[i];
@@ -849,3 +849,10 @@ void SalomeApp_Study::restoreState(int savePoint)
   if(activeModuleName != "") ((SalomeApp_Application*)application())->activateModule(activeModuleName);  
 }
 
+QString SalomeApp_Study::getVisulDump(int savePoint)
+{
+  _PTR(AttributeParameter) ap = studyDS()->GetCommonParameters("Interface Applicative", savePoint);
+  SALOMEDS_IParameters ip(ap);
+  ip.setDumpPython(true); //Enable DumpPython of visual parameters for modules.
+  return "";
+}
index fbf9c9834173ab5582282faa58049a6e14533c30..1b520e07c61f818b904719c7f59323670d4a8d13 100644 (file)
@@ -71,6 +71,7 @@ public:
   void                setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint);
   virtual int         storeState();
   virtual void        restoreState(int savePoint);
+  virtual QString     getVisulDump(int savePoint);
 
 protected:
   virtual void        saveModuleData ( QString theModuleName, QStringList theListOfFiles );