# Why does Selection disappear after Apply?

**URL:** https://discourse.paraview.org/t/why-does-selection-disappear-after-apply/14996
**Category:** Development
**Created:** [July 5, 2024, 12:04pm UTC](https://discourse.paraview.org/t/why-does-selection-disappear-after-apply/14996 "2024-07-05T12:04:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![joint](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joint](https://discourse.paraview.org/u/joint)
#### Post date: [July 5, 2024, 12:04pm UTC](https://discourse.paraview.org/t/why-does-selection-disappear-after-apply/14996/1 "2024-07-05T12:04:37Z")

</div>

Hello

I ve created selection using, including, this:

```auto
  vtkSMProxy* selectionSource = repr->GetSessionProxyManager()->NewProxy("sources", "IDSelectionSource");
  vtkSMPropertyHelper(selectionSource, "FieldType").Set(vtkSelectionNode::POINT); // vtkSelectionNode::POINT
  vtkSMPropertyHelper(selectionSource, "IDs").Set(IDs, ids.size() * 2);
  selectionSource->UpdateVTKObjects();

```

It works fine and is visible.

However, after I click Apply, it disappears, and the same code that produced selection before apply, does not work after it.

I am desperate about it, and have no clue

Help me, please
