+bool XGUI_Displayer::hasSelectionFilter(const Handle(SelectMgr_Filter)& theFilter)
+{
+ bool aFilterFound = false;
+
+ Handle(AIS_InteractiveContext) aContext = AISContext();
+ if (aContext.IsNull())
+ return aFilterFound;
+ const SelectMgr_ListOfFilter& aFilters = aContext->Filters();
+ SelectMgr_ListIteratorOfListOfFilter aIt(aFilters);
+ for (; aIt.More() && !aFilterFound; aIt.Next()) {
+ if (theFilter.Access() == aIt.Value().Access())
+ aFilterFound = true;
+ }
+ Handle(SelectMgr_CompositionFilter) aCompFilter = GetFilter();
+ const SelectMgr_ListOfFilter& aStoredFilters = aCompFilter->StoredFilters();
+ for (aIt.Initialize(aStoredFilters); aIt.More() && !aFilterFound; aIt.Next()) {
+ if (theFilter.Access() == aIt.Value().Access())
+ aFilterFound = true;
+ }
+ return aFilterFound;
+}
+