# Request: move one control point menu item

**URL:** https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578
**Category:** Support
**Created:** [February 27, 2024, 9:32pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578 "2024-02-27T21:32:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [February 27, 2024, 9:32pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/1 "2024-02-27T21:32:44Z")

</div>

Hi,

In the context menu of control points, the ‘Delete control point’ and ‘Delete \<Markup\>’ items are one after the other. It happened (rarely though) that the markups node gets accidentally deleted while deleting one point, just a wrong mouse position in a haste.

![Menu_item_ordering](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/d/9d9715307296b9f41de487bb43c5c411934b439c.png)

Would core devs consider moving the ‘Delete control point’ item upwards? Perhaps after ‘Rename control point’.

Thanks for considering and regards.

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [February 27, 2024, 11:20pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/2 "2024-02-27T23:20:17Z")

</div>

+1.

It happened to me more than once.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 28, 2024, 5:11am UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/4 "2024-02-28T05:11:43Z")

</div>

Probably enabling undo/redo is the right solution for this. You can enable undo/redo by copy-pasting [this code snippet](https://projectweek.na-mic.org/PW39_2023_Montreal/Projects/UndoRedo/) to your Python console (or add it to your startup script to always enable).

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [February 28, 2024, 5:52am UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/5 "2024-02-28T05:52:05Z")

</div>

We incorporated that into SlicerMorph as an option. It is ok for recovering deleted control points, but it creates weird issues when you are recovering a node.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 28, 2024, 1:38pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/6 "2024-02-28T13:38:16Z")

</div>

Scene undo/redo for the node types listed in the code snippet should work well. Please report any issues that you find.

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [February 28, 2024, 2:49pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/7 "2024-02-28T14:49:11Z")

</div>

> [@lassoan](#):
>
> Scene undo/redo for the node types listed in the code snippet should work well.

It works well indeed, even to recover a deleted node.

One last thing, could you point to a code snippet to move a newly created toolbar to the first row?

Thank you.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 28, 2024, 3:28pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/8 "2024-02-28T15:28:13Z")

</div>

I don’t think you can specify where the toolbar is added, but if you move the toolbar manually then the same position will be restored after you restart the application - if “Save user interface…” option is enabled (in Application settings / Appearance).

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [February 28, 2024, 3:37pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/9 "2024-02-28T15:37:11Z")

</div>

> [@lassoan](#):
>
> if “Save user interface…” option is enabled

This option is already activated in settings. My custom toolbar gets always created in second row and I move it up every time. I can just add the icons of the Undo/Redo code snippet in my custom toolbar, so that I don’t have 2 of them to move. This is very useful. 👍🏼

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [February 28, 2024, 4:23pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/10 "2024-02-28T16:23:51Z")

</div>

I think measurements being blocked bug has not been addressed yet. [Adding a default Markups node to scene removes measurements · Issue #7239 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/issues/7239)

Also, try creating a pointlist with 3-4 points. Delete the node, recover, and repeat the operation a few times (undo/redo), notice that one by one the points start to disappear from the list.

I also noticed a case where the node was removed from the scene by right click delete scene and yet the points remained visible in the 3D viewer. I can’t remember the sequence this was generated from. I will try to replicate…

But it is such a critical features, I think we should harden and incorporate into the core, as opposed to keeping at a snippet.

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [February 28, 2024, 4:56pm UTC](https://discourse.slicer.org/t/request-move-one-control-point-menu-item/34578/11 "2024-02-28T16:56:22Z")

</div>

> [@muratmaga](#):
>
> repeat the operation a few times (undo/redo), notice that one by one the points start to disappear from the list.

On repeat Undo/Redo after removing a fiducial node with 3 points, I do not see the points disappearing.

I noticed something else:

- create a Fiducial node with 3 points
- delete the node
- Undo
- Undo again : the third point is removed in the Markups module, but still persists in a slice view, being non-interactive. The first and second points become non-interactive also.
- Redo - the third point reappears in the Markups module, and all three points become interactive in the slice view.

> [@muratmaga](#):
>
> But it is such a critical features, I think we should harden and incorporate into the core, as opposed to keeping at a snippet.

It seems to be N° 1 in the feature request section.
