X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_SubShapeSelectorWdg.cxx;h=54560d8fc9bf96b6a7bc3b9ec70dda0a99dbeff7;hb=94b4f20a6565decaab6d3bab63b6236bb4dcdb37;hp=0518ee07ced03b644f3a84aa120d19bba24d92bc;hpb=7211ec8d0ebb65251f41eeb32b74b1e6e322a875;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx index 0518ee07c..54560d8fc 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -578,16 +578,12 @@ void StdMeshersGUI_SubShapeSelectorWdg::updateState() GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry( const QString& theEntry ) { GEOM::GEOM_Object_var aGeomObj; - SALOMEDS::Study_var aStudy = SMESHGUI::GetSMESHGen()->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) + SALOMEDS::SObject_var aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.toUtf8().data() ); + if (!aSObj->_is_nil() ) { - SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( theEntry.toLatin1().data() ); - if (!aSObj->_is_nil() ) - { - CORBA::Object_var obj = aSObj->GetObject(); - aGeomObj = GEOM::GEOM_Object::_narrow(obj); - aSObj->UnRegister(); - } + CORBA::Object_var obj = aSObj->GetObject(); + aGeomObj = GEOM::GEOM_Object::_narrow(obj); + aSObj->UnRegister(); } return aGeomObj._retn(); }