From: mpa Date: Fri, 3 Feb 2017 13:20:44 +0000 (+0300) Subject: Deleted Study parameter X-Git-Tag: Before_python3_27062017^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3698a6d21be8092b91724c6e3687aae687fffc62;p=modules%2Fhomard.git Deleted Study parameter --- diff --git a/doc/en/tutorials.rst b/doc/en/tutorials.rst index a4bc7edb..587a893d 100644 --- a/doc/en/tutorials.rst +++ b/doc/en/tutorials.rst @@ -16,7 +16,6 @@ The loading of the module HOMARD is done in a way similar to the other modules. import HOMARD homard = salome.lcc.FindOrLoadComponent('FactoryServer','HOMARD') - homard.SetStudy(salome.myStudy) To use the module HOMARD within a distributed scheme YACS, the loading is made as follows: @@ -25,7 +24,6 @@ To use the module HOMARD within a distributed scheme YACS, the loading is made a import HOMARD my_container.load_component_Library('HOMARD') homard = my_container.create_component_instance('HOMARD',0) - homard.SetStudy(salome.myStudy) Uniform refinement ****************** diff --git a/doc/files/tutorial_1.py b/doc/files/tutorial_1.py index 6a8a0253..51b46e37 100755 --- a/doc/files/tutorial_1.py +++ b/doc/files/tutorial_1.py @@ -87,4 +87,4 @@ gzip_gunzip(DATA_TUTORIAL, 1, 1) # ================================== # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/files/tutorial_2.py b/doc/files/tutorial_2.py index a615f4e8..8fe7b6a9 100755 --- a/doc/files/tutorial_2.py +++ b/doc/files/tutorial_2.py @@ -97,4 +97,4 @@ gzip_gunzip(DATA_TUTORIAL, 2, 1) # ================================== if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/files/tutorial_3.py b/doc/files/tutorial_3.py index ee4828bd..61ffaae6 100755 --- a/doc/files/tutorial_3.py +++ b/doc/files/tutorial_3.py @@ -126,4 +126,4 @@ gzip_gunzip(DATA_TUTORIAL, 3, 1) # ================================== if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/files/tutorial_4.py b/doc/files/tutorial_4.py index 85b79a3f..9b4751f1 100755 --- a/doc/files/tutorial_4.py +++ b/doc/files/tutorial_4.py @@ -113,4 +113,4 @@ gzip_gunzip(DATA_TUTORIAL, 4, 1) # ================================== if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/files/tutorial_5.py b/doc/files/tutorial_5.py index 9f347996..12bb4943 100755 --- a/doc/files/tutorial_5.py +++ b/doc/files/tutorial_5.py @@ -97,4 +97,4 @@ gzip_gunzip(DATA_TUTORIAL, 5, 1) # ================================== if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/idl/Gen.xml b/idl/Gen.xml index 83d9ee4e..b78c63cd 100644 --- a/idl/Gen.xml +++ b/idl/Gen.xml @@ -18,7 +18,6 @@ EDF 1.6 unknown - 1 1 HOMARD_2.png diff --git a/resources/HOMARDCatalog.xml.in b/resources/HOMARDCatalog.xml.in index 304c924a..ad8774cd 100644 --- a/resources/HOMARDCatalog.xml.in +++ b/resources/HOMARDCatalog.xml.in @@ -54,7 +54,6 @@ HOMARD team - EDF RD 1.4 unknown - 1 1 HOMARD_2.png @@ -1085,22 +1084,6 @@ - - SetCurrentStudy - HOMARD team - EDF RD - 1.1 - unknown - 0 - - - theStudy - Study - unknown - - - - - PublishBoundaryUnderCase HOMARD team - EDF RD diff --git a/src/HOMARDGUI/HOMARDGUI.h b/src/HOMARDGUI/HOMARDGUI.h index a2acb26a..cddac1cb 100644 --- a/src/HOMARDGUI/HOMARDGUI.h +++ b/src/HOMARDGUI/HOMARDGUI.h @@ -90,7 +90,6 @@ private: virtual void createPreferences(); HOMARD::HOMARD_Gen_var myComponentHomard; - SALOMEDS::Study_var myStudy; int anId; QString _ObjectName; diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.cxx b/src/HOMARDGUI/HOMARDGUI_Utils.cxx index 3b8b4ac0..1f5abdc0 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.cxx +++ b/src/HOMARDGUI/HOMARDGUI_Utils.cxx @@ -48,15 +48,6 @@ SALOME_ListIO HOMARD_UTILS::mySelected; -//================================================================ -// Function : GetCStudy -// Returne un pointeur sur l'etude courante -//================================================================ - _PTR(Study) HOMARD_UTILS::GetCStudy(const SalomeApp_Study* theStudy) -{ - return theStudy->studyDS(); -} - //================================================================ // Function : GetActiveStudy // Returne un pointeur sur l'etude active @@ -71,17 +62,15 @@ SUIT_Study* HOMARD_UTILS::GetActiveStudy() } //================================================================ -// Function : GetActiveStudyDocument +// Function : getStudy // Returne un pointeur sur l'etude active //================================================================ -_PTR(Study) HOMARD_UTILS::GetActiveStudyDocument() +_PTR(Study) HOMARD_UTILS::getStudy() { - SalomeApp_Study* aStudy = dynamic_cast(GetActiveStudy()); - if (aStudy){ - return aStudy->studyDS(); - } - else - return _PTR(Study)(); + static _PTR(Study) _study; + if(!_study) + _study = SalomeApp_Application::getStudy(); + return _study; } //================================================================ diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.h b/src/HOMARDGUI/HOMARDGUI_Utils.h index 81182a0d..2946cf54 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.h +++ b/src/HOMARDGUI/HOMARDGUI_Utils.h @@ -53,12 +53,8 @@ class LightApp_SelectionMgr; namespace HOMARD_UTILS { - HOMARD_EXPORT - _PTR(Study) - GetCStudy(const SalomeApp_Study* theStudy); - HOMARD_EXPORT SUIT_Study* GetActiveStudy(); - HOMARD_EXPORT _PTR(Study) GetActiveStudyDocument(); + HOMARD_EXPORT _PTR(Study) getStudy(); HOMARD_EXPORT void updateObjBrowser(); diff --git a/src/HOMARDGUI/HomardQtCommun.cxx b/src/HOMARDGUI/HomardQtCommun.cxx index 08e2a4d2..44f6f764 100644 --- a/src/HOMARDGUI/HomardQtCommun.cxx +++ b/src/HOMARDGUI/HomardQtCommun.cxx @@ -75,7 +75,7 @@ QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int option ) if ( aIO->hasEntry() ) { // MESSAGE("aIO->getEntry() = " << aIO->getEntry()); - _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); + _PTR(Study) aStudy = HOMARD_UTILS::getStudy(); _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); _PTR(GenericAttribute) anAttr; if (aSO->FindAttribute(anAttr, "AttributeComment") ) @@ -127,7 +127,7 @@ QString HOMARD_QT_COMMUN::SelectionCasEtude() Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); if ( aIO->hasEntry() ) { - _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); + _PTR(Study) aStudy = HOMARD_UTILS::getStudy(); _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); _PTR(SObject) aSObjCas = aSO->GetFather(); _PTR(GenericAttribute) anAttr; @@ -179,7 +179,7 @@ QString HOMARD_QT_COMMUN::PushNomFichier(bool avertir, QString TypeFichier) Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); if ( aIO->hasEntry() ) { - _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); + _PTR(Study) aStudy = HOMARD_UTILS::getStudy(); _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); _PTR(GenericAttribute) anAttr; _PTR(AttributeFileType) aFileType; diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index 8bf92949..b3ea5b88 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -38,6 +38,7 @@ #include "SALOMEDS_Tool.hxx" #include "SALOME_LifeCycleCORBA.hxx" #include "SALOMEconfig.h" +#include #include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog) #include CORBA_CLIENT_HEADER(SMESH_Gen) @@ -99,8 +100,7 @@ Engines_Component_i(orb, poa, contId, instanceName, interfaceName) ASSERT(SINGLETON_::IsAlreadyExisting()); _NS->init_orb(_orb); - CORBA::Object_var aStudyObject = _NS->Resolve( "/Study" ); - myStudy = SALOMEDS::Study::_narrow( aStudyObject ); + myStudy = SALOMEDS::Study::_duplicate( SMESH_Gen_i::getStudyServant() ); _tag_gene = 0 ; _tag_boun = 0 ; @@ -4319,13 +4319,12 @@ SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, // get temporary directory name std::string tmpDir = isMultiFile ? std::string(theURL) : SALOMEDS_Tool::GetTmpDir(); - SALOMEDS::Study_var aStudy = theComponent->GetStudy(); StudyContext& context = myStudyContext; // HOMARD data file name std::string aFileName = ""; if (isMultiFile) - aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()); + aFileName = SALOMEDS_Tool::GetNameFromPath(SMESH_Gen_i::getStudyServant()->URL()); aFileName += "_HOMARD.dat"; // initialize sequence of file names @@ -4434,7 +4433,6 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, CORBA::Boolean isMultiFile) { MESSAGE ("Load pour theURL = "<< theURL); - SALOMEDS::Study_var aStudy = theComponent->GetStudy(); // set current study if (myStudy->_is_nil()) @@ -4450,7 +4448,7 @@ CORBA::Boolean HOMARD_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, // HOMARD data file name std::string aFileName = ""; if (isMultiFile) - aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()); + aFileName = SALOMEDS_Tool::GetNameFromPath(SMESH_Gen_i::getStudyServant()->URL()); aFileName = tmpDir + aFileName + "_HOMARD.dat"; StudyContext& context = myStudyContext; @@ -4570,9 +4568,6 @@ CORBA::Boolean HOMARD_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent, //=========================================================================== void HOMARD_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent) { - if (theComponent->GetStudy()) - // - nullify myStudy - myStudy = SALOMEDS::Study::_nil(); }; //=========================================================================== @@ -4708,18 +4703,14 @@ PortableServer::ServantBase_var HOMARD_Gen_i::GetServant(CORBA::Object_ptr theOb } //========================================================================== -Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean isMultiFile, - CORBA::Boolean& isValidScript) +Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript) { MESSAGE ("Entree dans DumpPython"); isValidScript=1; - SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy); - if(CORBA::is_nil(aStudy)) - return new Engines::TMPFile(0); - SALOMEDS::SObject_var aSO = aStudy->FindComponent("HOMARD"); + SALOMEDS::SObject_var aSO = SMESH_Gen_i::getStudyServant()->FindComponent("HOMARD"); if(CORBA::is_nil(aSO)) return new Engines::TMPFile(0); @@ -4888,7 +4879,7 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, void HOMARD_Gen_i::IsValidStudy( ) { // MESSAGE( "IsValidStudy" ); - if (CORBA::is_nil(myStudy)) + if (CORBA::is_nil(SMESH_Gen_i::getStudyServant())) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx index bfe697dd..856e25f1 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.hxx +++ b/src/HOMARD_I/HOMARD_Gen_i.hxx @@ -297,10 +297,9 @@ private: HOMARD::HOMARD_Zone_ptr newZone(); - virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean isMultiFile, - CORBA::Boolean& isValidScript); + virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript); virtual char* getVersion(); std::string GetStringInTexte( const std::string Texte, const std::string String, int option ) ; diff --git a/src/tests/Test/test_1.py b/src/tests/Test/test_1.py index 3e6c238a..4267c919 100755 --- a/src/tests/Test/test_1.py +++ b/src/tests/Test/test_1.py @@ -62,7 +62,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -202,7 +202,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -215,6 +215,6 @@ DESTROY_DIR = not DEBUG test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR) # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/test_2.py b/src/tests/Test/test_2.py index 1dd59653..3b903cc7 100755 --- a/src/tests/Test/test_2.py +++ b/src/tests/Test/test_2.py @@ -62,7 +62,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -174,7 +174,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -187,6 +187,6 @@ DESTROY_DIR = not DEBUG test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR) # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/test_3.py b/src/tests/Test/test_3.py index 7ec7586c..15ddbd7d 100755 --- a/src/tests/Test/test_3.py +++ b/src/tests/Test/test_3.py @@ -63,7 +63,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -208,7 +208,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -221,6 +221,6 @@ DESTROY_DIR = not DEBUG test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR) # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/test_4.py b/src/tests/Test/test_4.py index 3c243f7b..f294ceaf 100755 --- a/src/tests/Test/test_4.py +++ b/src/tests/Test/test_4.py @@ -78,7 +78,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def geom_smesh_exec(theStudy): +def geom_smesh_exec(): """ Python script for GEOM and SMESH """ @@ -86,7 +86,7 @@ Python script for GEOM and SMESH # while not error : # - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() # # Creation of the box # =================== @@ -94,7 +94,7 @@ Python script for GEOM and SMESH # Creation of the mesh # ==================== - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() box_m = smesh.Mesh(box_g) smesh.SetName(box_m.GetMesh(), 'MESH') # @@ -139,7 +139,7 @@ Python script for GEOM and SMESH #======================================================================== # #======================================================================== -def field_exec(theStudy, niter): +def field_exec(niter): """ Python script for MEDCoupling """ @@ -185,7 +185,7 @@ Python script for MEDCoupling #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -290,7 +290,7 @@ Python script for HOMARD # Creation of the iteration 3 # - error = field_exec(theStudy, 2) + error = field_exec(2) if error : error = 30 break @@ -317,7 +317,7 @@ Python script for HOMARD # Geometry and Mesh # try : - ERROR = geom_smesh_exec(salome.myStudy) + ERROR = geom_smesh_exec() if ERROR : raise Exception('Pb in geom_smesh_exec') except Exception, eee: @@ -330,7 +330,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -343,6 +343,6 @@ DESTROY_DIR = not DEBUG test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR) # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/test_5.py b/src/tests/Test/test_5.py index 2f0bdc17..afcb13e1 100755 --- a/src/tests/Test/test_5.py +++ b/src/tests/Test/test_5.py @@ -77,7 +77,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def mesh_exec(theStudy): +def mesh_exec(): """ Python script for MED """ @@ -178,7 +178,7 @@ Python script for MED #======================================================================== # #======================================================================== -def field_exec(theStudy, niter): +def field_exec(niter): """ Python script for MEDCoupling """ @@ -233,7 +233,7 @@ Python script for MEDCoupling #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -274,7 +274,7 @@ Python script for HOMARD # # Creation of the indicator # - error, ficmed_indic = field_exec(theStudy, niter) + error, ficmed_indic = field_exec(niter) if error : error = 10 break @@ -305,7 +305,7 @@ Python script for HOMARD # Geometry and Mesh # try : - ERROR = mesh_exec(salome.myStudy) + ERROR = mesh_exec() if ERROR : raise Exception('Pb in mesh_exec') except Exception, eee: @@ -318,7 +318,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -331,6 +331,6 @@ DESTROY_DIR = not DEBUG test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR) # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_1.py b/src/tests/Test/tutorial_1.py index fdcddf2f..5b49365c 100755 --- a/src/tests/Test/tutorial_1.py +++ b/src/tests/Test/tutorial_1.py @@ -69,7 +69,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -120,7 +120,7 @@ homard.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -137,6 +137,6 @@ gzip_gunzip(DATA_TUTORIAL, 1, 1) # ================================== # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_2.py b/src/tests/Test/tutorial_2.py index c1d29e8f..6c486104 100755 --- a/src/tests/Test/tutorial_2.py +++ b/src/tests/Test/tutorial_2.py @@ -69,7 +69,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -131,7 +131,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -148,6 +148,6 @@ gzip_gunzip(DATA_TUTORIAL, 2, 1) # ================================== # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_3.py b/src/tests/Test/tutorial_3.py index d7b3b523..337dd83d 100755 --- a/src/tests/Test/tutorial_3.py +++ b/src/tests/Test/tutorial_3.py @@ -69,7 +69,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -160,7 +160,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -177,6 +177,6 @@ gzip_gunzip(DATA_TUTORIAL, 3, 1) # ================================== # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_4.py b/src/tests/Test/tutorial_4.py index be7ebcfa..12cddf95 100755 --- a/src/tests/Test/tutorial_4.py +++ b/src/tests/Test/tutorial_4.py @@ -69,7 +69,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -147,7 +147,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -164,6 +164,6 @@ gzip_gunzip(DATA_TUTORIAL, 4, 1) # ================================== # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_5.py b/src/tests/Test/tutorial_5.py index 4561695e..d5ffc694 100755 --- a/src/tests/Test/tutorial_5.py +++ b/src/tests/Test/tutorial_5.py @@ -69,7 +69,7 @@ IPAR.append("AP_MODULES_LIST", "Homard") # #======================================================================== #======================================================================== -def homard_exec(theStudy): +def homard_exec(): """ Python script for HOMARD """ @@ -131,7 +131,7 @@ HOMARD.SetLanguageShort("fr") # Exec of HOMARD-SALOME # try : - ERROR = homard_exec(salome.myStudy) + ERROR = homard_exec() if ERROR : raise Exception('Pb in homard_exec at iteration %d' %ERROR ) except Exception, eee: @@ -148,6 +148,6 @@ gzip_gunzip(DATA_TUTORIAL, 5, 1) # ================================== # if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1)