X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMFiltersSelection%2FGEOM_ShapeTypeFilter.cxx;h=1de7bd2e01f7a16cddb7574fa8f07cb366121e64;hb=67100410d9f3f55f71ca7538db2cd820268ed8ec;hp=9d98cc99875f48327a67120c17d1bc0931cfb861;hpb=d3dd282390888d7dc091ba2c2ffe7923bd7458e6;p=modules%2Fgeom.git diff --git a/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx b/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx index 9d98cc998..1de7bd2e0 100644 --- a/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -26,7 +26,8 @@ // Module : GEOM // $Header$ -using namespace std; +#include + #include "GEOM_ShapeTypeFilter.ixx" #include "SALOME_InteractiveObject.hxx" #include "GEOM_Client.hxx" @@ -44,8 +45,11 @@ static bool getShape( const GEOM::GEOM_Object_ptr& theObject, TopoDS_Shape& theS { if ( !CORBA::is_nil( theObject ) ) { - Engines::Component_var comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", "GEOM" ); - GEOM::GEOM_Gen_var myGeom = GEOM::GEOM_Gen::_narrow( comp ); + static GEOM::GEOM_Gen_var myGeom; + if(CORBA::is_nil(myGeom) { + Engines::Component_var comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", "GEOM" ); + myGeom = GEOM::GEOM_Gen::_narrow( comp ); + } TopoDS_Shape aTopoDSShape = GEOM_Client().GetShape( myGeom, theObject ); if ( !aTopoDSShape.IsNull() )