From: imn Date: Tue, 18 Oct 2016 13:42:36 +0000 (+0300) Subject: 0023299: [CEA] Finalize multi-study removal X-Git-Tag: Before_python3_27062017~1^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=118534af383c5242acbacca5f98d2ad0baf3fa38;p=modules%2Fmed.git 0023299: [CEA] Finalize multi-study removal - delete study id parameter --- diff --git a/src/MEDCalc/cmp/MED.cxx b/src/MEDCalc/cmp/MED.cxx index 0565faee5..1c65f366e 100644 --- a/src/MEDCalc/cmp/MED.cxx +++ b/src/MEDCalc/cmp/MED.cxx @@ -399,12 +399,11 @@ MED::hasObjectInfo() } char* -MED::getObjectInfo(CORBA::Long studyId, const char* entry) +MED::getObjectInfo(const char* entry) { SALOME_LifeCycleCORBA lcc; - CORBA::Object_var aSMObject = lcc.namingService()->Resolve( "/myStudyManager" ); - SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject ); - SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId ); + CORBA::Object_var aStudyObject = lcc.namingService()->Resolve("/Study"); + SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( aStudyObject ); SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( entry ); SALOMEDS::SObject_var aResultSObj; if (aSObj->ReferencedObject(aResultSObj)) diff --git a/src/MEDCalc/cmp/MED.hxx b/src/MEDCalc/cmp/MED.hxx index 115e9e268..b970de034 100644 --- a/src/MEDCalc/cmp/MED.hxx +++ b/src/MEDCalc/cmp/MED.hxx @@ -91,7 +91,7 @@ public: // For tooltips virtual CORBA::Boolean hasObjectInfo(); - virtual char* getObjectInfo(CORBA::Long studyId, const char* entry); + virtual char* getObjectInfo(const char* entry); private: std::map _fieldSeriesEntries; diff --git a/src/MEDCalc/cmp/test_medcalc_components.py b/src/MEDCalc/cmp/test_medcalc_components.py index 9923f4582..69e10785d 100644 --- a/src/MEDCalc/cmp/test_medcalc_components.py +++ b/src/MEDCalc/cmp/test_medcalc_components.py @@ -61,7 +61,7 @@ if salome.lcc is None: __import__(corbaModule) factory=salome.lcc.FindOrLoadComponent(containerType,componentName) # This is not the main CORBA component of the SALOME module MED -# (i.e. the engine associated to the active study), but the CORBA +# (i.e. the engine associated to the study), but the CORBA # entry point for MED fields operations (i.e. a CORBA component # reachable throught the LifeCycleCORBA). This entry point is used to # get the other SALOME CORBA components required for MED field diff --git a/src/MEDCalc/gui/DatasourceController.cxx b/src/MEDCalc/gui/DatasourceController.cxx index dda57da3d..3797c1b09 100644 --- a/src/MEDCalc/gui/DatasourceController.cxx +++ b/src/MEDCalc/gui/DatasourceController.cxx @@ -223,9 +223,6 @@ void DatasourceController::OnAddImagesource() void DatasourceController::OnExpandField() { - // We need a studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject) SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); for (int i=0; isize(); i++) { @@ -271,9 +268,6 @@ void DatasourceController::OnExpandField() } void DatasourceController::OnUseInWorkspace() { - // We need a studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject) SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); if ( listOfSObject->size() == 1 ) { diff --git a/src/MEDCalc/gui/PresentationController.cxx b/src/MEDCalc/gui/PresentationController.cxx index c0fd9bce4..5372aa1b6 100644 --- a/src/MEDCalc/gui/PresentationController.cxx +++ b/src/MEDCalc/gui/PresentationController.cxx @@ -299,9 +299,6 @@ PresentationController::getSelectedScalarBarRange() const void PresentationController::visualize(PresentationEvent::EventType eventType) { - // We need a _studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject) SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); @@ -406,9 +403,6 @@ PresentationController::onVisualizePointSprite() void PresentationController::onDeletePresentation() { - // We need a _studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject) SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); @@ -664,9 +658,6 @@ PresentationController::onPresentationSelected(int presId, const QString& presTy void PresentationController::onParavisDump() { - // We need a _studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject) SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects(); diff --git a/src/MEDCalc/gui/ProcessingController.cxx b/src/MEDCalc/gui/ProcessingController.cxx index d78eacd61..0665f3726 100644 --- a/src/MEDCalc/gui/ProcessingController.cxx +++ b/src/MEDCalc/gui/ProcessingController.cxx @@ -82,9 +82,6 @@ ProcessingController::createActions() void ProcessingController::OnChangeUnderlyingMesh() { - // We need a studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject). In cas of a // multiple selection, we consider only the first item. At least one // item must be selected. @@ -147,9 +144,6 @@ ProcessingController::OnChangeUnderlyingMeshInputValidated() void ProcessingController::OnInterpolateField() { - // We need a studyEditor updated on the active study - _studyEditor->updateActiveStudy(); - // Get the selected objects in the study (SObject). In case of a // multiple selection, we consider only the first item. At least one // item must be selected. diff --git a/src/MEDCalc/tui/medcorba.py b/src/MEDCalc/tui/medcorba.py index 9288d85be..1c05b4de4 100644 --- a/src/MEDCalc/tui/medcorba.py +++ b/src/MEDCalc/tui/medcorba.py @@ -45,7 +45,7 @@ import MEDCALC # corbaModule med_engine = salome.lcc.FindOrLoadComponent(containerType,medComponentName) factory = salome.lcc.FindOrLoadComponent(containerType,factoryComponentName) # The factory is not the main CORBA component of the SALOME module MED -# (i.e. the engine associated to the active study), but the CORBA +# (i.e. the engine associated to the study), but the CORBA # entry point for MED fields operations (i.e. a CORBA component # reachable throught the LifeCycleCORBA). This entry point is used to # get the other SALOME CORBA components required for MED field