+ PartSet_SketcherMgr::sketchSelectionModes(mySketchMgr->activeSketch(), theModes);
+ else
+ theModes = XGUI_Tools::workshop(myWorkshop)->viewerSelectionModes();
+}
+
+//******************************************************
+void PartSet_Module::moduleSelectionModes(int theModesType, QIntList& theModes)
+{
+ customSubShapesSelectionModes(theModes);
+ //theModes.append(XGUI_Tools::workshop(myWorkshop)->viewerSelectionModes());
+ //myWorkshop->module()->activeSelectionModes(theModes);
+}
+
+//******************************************************
+void PartSet_Module::moduleSelectionFilters(const QIntList& theFilterTypes,
+ SelectMgr_ListOfFilter& theSelectionFilters)
+{
+ bool isSketchActive = mySketchMgr->activeSketch().get();
+
+ std::map<XGUI_SelectionFilterType, Handle(SelectMgr_Filter)>::const_iterator aFiltersIt =
+ mySelectionFilters.begin();
+ for (; aFiltersIt != mySelectionFilters.end(); aFiltersIt++) {
+ int aFilterType = aFiltersIt->first;
+ // do not add not participating filters in given parameters
+ if (!theFilterTypes.contains(aFilterType))
+ continue;
+
+ // using sketch filters only if sketch operation is active
+ if (!isSketchActive &&
+ mySketchMgr->sketchSelectionFilter((XGUI_SelectionFilterType)aFilterType))
+ continue;
+
+ // using filtering of construction results only from faces panel
+ if (aFilterType == SF_ResultGroupNameFilter)
+ continue;
+
+ theSelectionFilters.Append(aFiltersIt->second);
+ }
+}
+
+//******************************************************
+QIntList PartSet_Module::selectionFilters()
+{
+ QIntList aTypes;
+
+ std::map<XGUI_SelectionFilterType, Handle(SelectMgr_Filter)>::const_iterator aFiltersIt =
+ mySelectionFilters.begin();
+ for (; aFiltersIt != mySelectionFilters.end(); aFiltersIt++)
+ aTypes.append(aFiltersIt->first);
+
+ return aTypes;
+}
+
+//******************************************************
+void PartSet_Module::registerSelectionFilter(const XGUI_SelectionFilterType theFilterType,
+ const Handle(SelectMgr_Filter)& theFilter)
+{
+ mySelectionFilters[theFilterType] = theFilter;