X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ViewerFilters.cpp;h=81f84dda6641d9c604cbac02c90ef19374fd4ecb;hb=ec091ee8278311fb7a69c54a68670b66edd8db2d;hp=1e56112a7ebf23a03a1c47737af88e9a23831ca2;hpb=7bf19255421b34594c7b0a76d0ce28166d0ce895;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index 1e56112a7..81f84dda6 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -92,32 +92,3 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk(const Handle(SelectMgr_Enti } return Standard_False; } - - -IMPLEMENT_STANDARD_HANDLE(ModuleBase_ObjectTypesFilter, SelectMgr_Filter); -IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ObjectTypesFilter, SelectMgr_Filter); - - -//TODO (VSV): Check bug in OCCT: Filter result is ignored (bug25340) -Standard_Boolean ModuleBase_ObjectTypesFilter::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const -{ - Standard_Boolean isOk = ModuleBase_ShapeDocumentFilter::IsOk(theOwner); - if (isOk && theOwner->HasSelectable()) { - Handle(AIS_InteractiveObject) aAisObj = - Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable()); - if (!aAisObj.IsNull()) { - std::shared_ptr aAISObj = AISObjectPtr(new GeomAPI_AISObject()); - aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aAisObj)); - ObjectPtr aObj = myWorkshop->findPresentedObject(aAISObj); - - foreach (QString aType, myTypes) { - if (aType.toLower() == "construction") { - ResultConstructionPtr aConstr = - std::dynamic_pointer_cast(aObj); - return (aConstr != NULL); - } // ToDo: Process other types of objects - } - } - } - return Standard_False; -}