From: mpv Date: Fri, 3 Apr 2020 07:59:04 +0000 (+0300) Subject: Fix for the issue #3200 : Can't select SHAPERSTUDY groups in Netgen local size X-Git-Tag: V9_5_0a2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bcb3b6e5cdffc1ebd118d37aa7b2099613bff297;p=modules%2Fsmesh.git Fix for the issue #3200 : Can't select SHAPERSTUDY groups in Netgen local size --- diff --git a/src/PluginUtils/GeomSelectionTools.cxx b/src/PluginUtils/GeomSelectionTools.cxx index 936afcb31..a52ac6b5d 100644 --- a/src/PluginUtils/GeomSelectionTools.cxx +++ b/src/PluginUtils/GeomSelectionTools.cxx @@ -199,7 +199,8 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){ if ( aSO->ReferencedObject( aRefSObj )) aSO = aRefSObj; // MESSAGE("aSO->GetFatherComponent()->ComponentDataType(): " << aSO->GetFatherComponent()->ComponentDataType()); - if ( strcmp(aSO->GetFatherComponent()->ComponentDataType().c_str(),"GEOM") == 0) + std::string aComponentType = aSO->GetFatherComponent()->ComponentDataType(); + if (aComponentType == "GEOM" || aComponentType == "SHAPERSTUDY") aShape = SMESH::SObjectToInterface(aSO); if ( !aShape->_is_nil() ){ // MESSAGE("Got the Geom Object "); @@ -207,7 +208,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){ SalomeApp_Application* anApp = GetSalomeApplication(); if (anApp) { // MESSAGE("Got Application"); - Engines::EngineComponent_var component = anApp->lcc()->FindOrLoad_Component( "FactoryServer","GEOM" ); + Engines::EngineComponent_var component = anApp->lcc()->FindOrLoad_Component( "FactoryServer", aComponentType.c_str()); GEOM::GEOM_Gen_var _geomEngine = GEOM::GEOM_Gen::_narrow(component); // MESSAGE("Got GEOM engine"); // if the Geom Object is a group