Slate Context Menu Requests

Hey guys,

Could you continue to render new frames in the editor viewports when slate is rendering a context menu? I noticed it the other day while working on a plugin that allowed data to be entered in the context menu. After the code ran and the scene had been updated, nothing changed until I dismissed the context menu.

Also, is there a way to have a widget dismiss the owning context menu manually? I have a custom widget I want to be able to close the context menu when the user finishes editing/entering data.

Thanks!

We throttle the viewport drawing when a menu is open (and in a couple of other places like scrolling) in order to keep the editor responsive when expensive scenes are open. We’re considering more adaptive throttling approach so there are less cases where we have to throttle.

You can call FSlateApplication::Get().DismissAllMenus or FSlateApplication::Get().DismissMenu() to close menus. DismissMenu takes a window to dismiss which is returned from FSlateApplication::PushMenu or you can call FSlateApplication::FindWidgetWindow to find the window given any widget.

Ah yeah, that’s what I figured. Instead of a sophisticated adaptive throttling approach, have you considered just exposing a way to manually override it for a frame? Some kind of forced dirty marker?

Awesome, thanks for the tip on dismissing the menus.