]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_ViewerProxy.cpp
Salome HOME
Issue #236: Provide filtering of selected objects for extrusion
[modules/shaper.git] / src / XGUI / XGUI_ViewerProxy.cpp
index fee0419ddd6dfb31fbd19fce786d7fceee121325..782023d870aa6cb4bdfaf996f1c2436c2b8624fc 100644 (file)
@@ -187,3 +187,30 @@ bool XGUI_ViewerProxy::isMultiSelectionEnabled() const
     return myWorkshop->mainWindow()->viewer()->isMultiSelectionEnabled();
   }
 }
+
+//***************************************
+void XGUI_ViewerProxy::addSelectionFilter(const Handle(SelectMgr_Filter)& theFilter)
+{
+  Handle(AIS_InteractiveContext) aContext = AISContext();
+  if (!aContext.IsNull()) {
+    aContext->AddFilter(theFilter);
+  }
+}
+
+//***************************************
+void XGUI_ViewerProxy::removeSelectionFilter(const Handle(SelectMgr_Filter)& theFilter)
+{
+  Handle(AIS_InteractiveContext) aContext = AISContext();
+  if (!aContext.IsNull()) {
+    aContext->RemoveFilter(theFilter);
+  }
+}
+
+//***************************************
+void XGUI_ViewerProxy::clearSelectionFilters()
+{
+  Handle(AIS_InteractiveContext) aContext = AISContext();
+  if (!aContext.IsNull()) {
+    aContext->RemoveFilters();
+  }
+}