X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ViewerFilters.cpp;h=81f84dda6641d9c604cbac02c90ef19374fd4ecb;hb=af851100774c4ff33b515c884abe0cd03c3f0528;hp=94625a48094797a60e63dad02d46e11366f26907;hpb=c11c3bbeb38d103a882fc24c0f2cb933b20d4053;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index 94625a480..81f84dda6 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModuleBase_ViewerFilters.cpp // Created: 07 Okt 2014 // Author: Vitaly SMETANNIKOV @@ -90,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; -}