I’m trying to modify visible options of the right-click context menu, but my customization is not being maintained. I haven’t figured out what causes it by it ultimately returns to the default right-click context menu and reverting my customization.
Appears to happen when I customize and then I right-click in the open area to bring up the transform/adjust Window/Level/Place/Copy menu. Then when right-clicking over the markups it is different from the beginning.
Was there a defined way to customize the right-click context menu of the Slice view versus the right-click context menu on a markups point? I would guess this is contributing to the problem as one is probably redefining the other?
You are probably right. The view context menu was recently overhauled by @lassoan so I’d refer to him with this, since he is more familiar with the latest code.
I’ve checked the code and the menu is rebuilt after a menu is constructed without any visible items (because none of the DisplayedViewContextMenuActionNames were visible when you right-clicked on the view background). This problem has not come up before because the menu was only available for markups. I’ll push a fix later today.
Thanks! I guess those 4 empty string “” entries returned by availableViewContextMenuActionNames() were those 4 new slice view context menu actions.
I guess if they weren’t empty string named actions, then I probably could have customized to something like newActions = ["ToggleSelectPointAction", "ViewTransformAction"] to have at least one action in both menus and then they would not get recreated from default and maintain the customization.