Salome HOME
0023299: [CEA] Finalize multi-study removal
authorimn <imn@opencascade.com>
Tue, 18 Oct 2016 13:42:36 +0000 (16:42 +0300)
committerimn <imn@opencascade.com>
Tue, 18 Oct 2016 13:42:36 +0000 (16:42 +0300)
- delete study id parameter

src/MEDCalc/cmp/MED.cxx
src/MEDCalc/cmp/MED.hxx
src/MEDCalc/cmp/test_medcalc_components.py
src/MEDCalc/gui/DatasourceController.cxx
src/MEDCalc/gui/PresentationController.cxx
src/MEDCalc/gui/ProcessingController.cxx
src/MEDCalc/tui/medcorba.py

index 0565faee5f2087d907decad766d221645c6cfb14..1c65f366e6a0718115d439441663e6f1e4ee6963 100644 (file)
@@ -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))
index 115e9e2680ff599739f8299cb80d6801bf5b772d..b970de034eabacb445e25fbcfc748516aebf0e15 100644 (file)
@@ -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<long, std::string> _fieldSeriesEntries;
index 9923f4582ffed2712b0ad3014c4d416598b5c49c..69e10785d47c28ee79827324b1571538619642b7 100644 (file)
@@ -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
index dda57da3db4d9206c9725a240d2f4b2ef1445932..3797c1b093d8981410f5c11a04efb16c9420bdf7 100644 (file)
@@ -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; i<listOfSObject->size(); 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 ) {
index c0fd9bce40d7b2b1c2100bdfe83255c2ab4647e2..5372aa1b6f640793f3c85cfcbbb0931681e68531 100644 (file)
@@ -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();
 
index d78eacd61f4fa7395470bfa3abff3ae4df7088bf..0665f3726ccb45bac1e8b534ac34097b92d8be45 100644 (file)
@@ -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.
index 9288d85be9f9442cc02f5e8ed88483b5759a67e6..1c05b4de4ecd8d977f9baf890b2e183694e0e500 100644 (file)
@@ -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