X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARDGUI%2FHOMARDGUI_Utils.cxx;h=ec600c8ffe451de8985a8ed21e2b9d4c450630b1;hb=refs%2Ftags%2FV9_13_0b1;hp=de83540fdcfa33b382d27be9a9aac12ece39d64b;hpb=0d34303ea7a124c42783c9dc08accead8c4a6c69;p=modules%2Fhomard.git diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.cxx b/src/HOMARDGUI/HOMARDGUI_Utils.cxx index de83540f..ec600c8f 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.cxx +++ b/src/HOMARDGUI/HOMARDGUI_Utils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2016 CEA/DEN, EDF R&D +// Copyright (C) 2011-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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; } //================================================================