From bc7ec60fbe2afbd992af1c15e9a63b7571bd30ef Mon Sep 17 00:00:00 2001 From: srn Date: Tue, 7 Feb 2006 10:23:39 +0000 Subject: [PATCH] modified method DumpStudy --- src/SalomeApp/SalomeApp_Application.cxx | 4 +++- src/SalomeApp/SalomeApp_Study.cxx | 9 ++++++++- src/SalomeApp/SalomeApp_Study.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index e4e0d9f9d..916996954 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -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"), diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 9e07bf956..4233e598a 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -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 views = vm->getViews(); for(int i = 0, j = 0; iactivateModule(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 ""; +} diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index fbf9c9834..1b520e07c 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -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 ); -- 2.39.2