+ myMapIOSubIndex.clear();
+}
+
+/*!
+ To apply a filter on the selection
+ \param theFilter - new filter
+*/
+void
+SVTK_SelectorDef
+::SetFilter(const Handle(VTKViewer_Filter)& theFilter)
+{
+ myFilters.insert(TFilters::value_type(theFilter->GetId(),theFilter));
+}
+
+/*!
+ \return true if filter with given number is applyed
+ \param theId - filter id
+*/
+bool
+SVTK_SelectorDef
+::IsFilterPresent(const TFilterID theId) const
+{
+ return myFilters.find(theId) != myFilters.end();
+}
+
+/*!
+ To remove a filter from the selection
+ \param theId - filter id
+*/
+void
+SVTK_SelectorDef
+::RemoveFilter(const TFilterID theId)
+{
+ if(IsFilterPresent(theId))
+ myFilters.erase(theId);
+}
+
+/*!
+ \return true if the index satisfy installed filters
+ \param theActor - actor
+ \param theId - filter id
+ \param theIsNode - whether it is node
+*/
+bool
+SVTK_SelectorDef
+::IsValid(SALOME_Actor* theActor,
+ const TFilterID theId,
+ const bool theIsNode) const
+{
+ TFilters::const_iterator anIter = myFilters.begin();
+ for(; anIter != myFilters.end(); ++anIter){
+ const Handle(VTKViewer_Filter)& aFilter = anIter->second;
+ if(theIsNode == aFilter->IsNodeFilter() &&
+ !aFilter->IsValid(theActor,theId))
+ return false;
+ }
+ return true;
+}
+
+/*!
+ \return filter by it's id
+ \param theId - filter id
+*/
+Handle(VTKViewer_Filter)
+SVTK_SelectorDef
+::GetFilter(const TFilterID theId) const
+{
+ TFilters::const_iterator anIter = myFilters.find(theId);
+ if(anIter != myFilters.end()){
+ const Handle(VTKViewer_Filter)& aFilter = anIter->second;
+ return aFilter;
+ }
+ return Handle(VTKViewer_Filter)();
+}
+
+vtkActorCollection*
+SVTK_SelectorDef
+::Pick(const SVTK_SelectionEvent* theEvent, vtkRenderer* theRenderer) const
+{
+ vtkActorCollection* aListActors = NULL;
+
+ if ( GetDynamicPreSelection() ) {
+ myCellPicker->Pick(theEvent->myX,
+ theEvent->myY,
+ 0.0,
+ theRenderer);
+
+ aListActors = myCellPicker->GetActors();
+ }
+
+ if ( !aListActors || !aListActors->GetNumberOfItems() ) {
+ myPicker->Pick(theEvent->myX,
+ theEvent->myY,
+ 0.0,
+ theRenderer);
+ aListActors = myPicker->GetActors();
+ }
+
+ return aListActors;
+}
+
+void
+SVTK_SelectorDef
+::SetTolerance(const double& theTolerance)
+{
+ myPicker->SetTolerance(theTolerance);
+ myCellPicker->SetTolerance(theTolerance);
+}
+
+void
+SVTK_SelectorDef
+::SetDynamicPreSelection( bool theIsDynPreselect )
+{
+ myDynamicPreselection = theIsDynPreselect;
+}
+
+bool
+SVTK_SelectorDef
+::GetDynamicPreSelection() const
+{
+ return myDynamicPreselection;
+}
+
+void
+SVTK_SelectorDef
+::SetPreSelectionEnabled( bool theEnabled )
+{
+ myPreselectionEnabled = theEnabled;
+}
+
+bool
+SVTK_SelectorDef
+::IsPreSelectionEnabled() const
+{
+ return mySelectionEnabled && myPreselectionEnabled;
+}
+
+void
+SVTK_SelectorDef
+::SetSelectionEnabled( bool theEnabled )
+{
+ mySelectionEnabled = theEnabled;
+}
+
+bool
+SVTK_SelectorDef
+::IsSelectionEnabled() const
+{
+ return mySelectionEnabled;