-
- // set current study
- std::vector<std::string> studies = SalomeApp_Application::studyMgr()->GetOpenStudies();
- if ( studies.size() > 0 )
- {
- _PTR(Study) study = SalomeApp_Application::studyMgr()->GetStudyByName( studies[0] );
- int studyId = study->StudyId();
- if ( myCachedStudyId != studyId )
- {
- myCachedStudyId = studyId;
- SMESHGUI::GetSMESHGen()->SetCurrentStudy( _CAST(Study, study)->GetStudy() );
- }
- }
- else
- {
- myCachedStudyId = 0;
- }