]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Minor fix for notebokk access
authorvsr <vsr@opencascade.com>
Wed, 24 Apr 2013 14:41:23 +0000 (14:41 +0000)
committervsr <vsr@opencascade.com>
Wed, 24 Apr 2013 14:41:23 +0000 (14:41 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx
src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx

index 56cde9e3c38dcba755a436d456edbb5523e7388c..e912111f98a2c1527ea46c484cbfc70ed2f30e18 100644 (file)
@@ -941,11 +941,10 @@ std::string SALOMEDSImpl_Study::_GetStudyVariablesScript()
  *  Purpose  :
  */
 //============================================================================
-std::string SALOMEDSImpl_Study::_GetNoteBookAccess()
+std::string SALOMEDSImpl_Study::_GetNoteBookAccess(const std::string& theStudyVar)
 {
-  std::string accessor = _GetNoteBookAccessor();
   std::string notebook = "import salome_notebook\n";
-  notebook += accessor+" = salome_notebook.NoteBook(";
+  notebook += _GetNoteBookAccessor() + " = salome_notebook.NoteBook(" + theStudyVar + ")" ;
   return notebook;
 }
 
@@ -1275,11 +1274,11 @@ bool SALOMEDSImpl_Study::DumpStudy(const std::string& thePath,
   // initialization function
   sfp << aBatchModeScript << ".salome_init()" << std::endl;
   if ( !isMultiFile ) {
-    sfp << "theStudy = " << aStudyVar <<std::endl << std::endl;
+    sfp << "theStudy = " << aStudyVar << std::endl << std::endl;
     aStudyVar = "theStudy";
   }
   // notebook initialization
-  sfp << _GetNoteBookAccess() << aStudyVar << ")" <<std::endl;
+  sfp << _GetNoteBookAccess(aStudyVar) << std::endl;
 
   // extend sys.path with the directory where the script is being dumped to
   sfp << "sys.path.insert( 0, r\'" << thePath << "\')" << std::endl << std::endl;
index 7842da34f1930957be01b99c3f92f0f321c55ebd..a45779c8bda05366fc0bf58c93cd4e8a5c6e597b 100644 (file)
@@ -88,7 +88,7 @@ private:
 
   std::string _GetStudyVariablesScript();
   std::string _GetNoteBookAccessor();
-  std::string _GetNoteBookAccess();
+  std::string _GetNoteBookAccess(const std::string& theStudyVar);
 
 public: