Hello, I am placing many markup points on a surface in the 3D view. Occasionally I middle-mouse drag to pan the 3D view and I accidentally end up dragging all the control points for the node. This operation is not undo-able as far as I can tell. Is there any way to disable middle-mouse drag for markups, but leave the control points unlocked for editing?
There are two ways to mitigate this problem. Either per point basis or for all points in the markup object.
After placing the markup point in correct position, you can click the lock button next to it in the control points table. You won’t be able to reposition this landmark until you unlock it. (red highlight)
You can click the lock button (on the left) to disable to any interaction with any of the control points in the markups list. You can still new points to add to list, but cannot move them. (blue highlight)
If you find yourself doing this a lot, you could assign a keyboard shortcut that locks/unlocks the current node.
This thread should help: Undo feature for Markups module · Issue #4576 · Slicer/Slicer · GitHub
@muratmaga Thanks for the insight. I have over a thousand points and I need to leave them unlocked for editing, but I discovered that if even a single control point is locked, then middle-mouse dragging of all control points is disabled.
In my case I just leave the first point locked and this allows me to continue editing while avoiding the unwanted behavior of accidently dragging points when panning the 3D view.
You mean you drag all the points together when you accidentally drag one? If that’s the case, I remember a bug like that, which I thought was fixed sometime ago. What version of Slicer are you using?
The alternative if to define a key (e.g., l for lock) as @pieper suggested, so that you don’t have to interact with the menus (which slows you down).
@muratmaga I do believe that left-click to drag a single point and middle-click to drag all points within a node is the intended behavior (I’m on Slicer v5.3.0).
The idea of assigning a shortcut to lock / unlock the node every time I want to pan in the 3D view is reasonable solution, but In my case I think I’ll go with leaving the first point in the list locked and all other points unlocked. This way I can continue editing without accidentally middle-mouse dragging all my points.
Thanks for the ideas!
No from my perspective that’s a bug, and a costly one, as you cannot undo it! I am surprised it is not fixed. The same functionality can easily achieved by putting the markup list under a transform object and doing the same via transforms.
@pieper @lassoan, I think this is an accident waiting to happen. What’s the use case behind this that overcomes the risk it creates.
Definition of a bug: a feature that cannot be turned off.
This feature can be turned off by mapping the middle-button click-and-drag interaction event to no widget event. It requires Python scripting, so you may argue that it cannot be turned off. Maybe we should make these event mappings adjustable via some GUI.
Alternatively, you can enable undo/redo for markups.
That would be the most useful thing. How do you do that?
This post has information on markups undo/redo
I meant making it widely available for the users, not just for developers.