Announcement

Collapse
No announcement yet.

FModeToolkit Spinbox not updating viewport

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FModeToolkit Spinbox not updating viewport

    Hello,

    I'm having some issues with a custom EdModeToolkit Slate editor plugin, each time I interact with the UI the viewport does not update immediately. The OnValueChanged callback is connected to a method that deforms the selected mesh.
    1. SAssignNew(Slider, SSpinBox<float>)
    2. .PreventThrottling(true)
    3. .OnValueChanged(this, &FCustomEdModeToolkit::SpinTestHandler)

    The interaction seems slow and laggy. When I put the same method in the OnConstruction construction script override of the actor it self it does update right away without any lags. (Changing UPROPERTY directly on the actor)

    I have tried the following:

    Refresh issue?
    1. Change the 'PreventThrotteling' setting in the Spinbox to make sure that the viewport refreshes on each value change.
    2. Force refresh the viewport using FEditorViewportClient and Invalidating the current viewport. Similar issue: https://answers.unrealengine.com/que...pinbox-fm.html

    Focus issue?
    1. Tried to change the selection state in the viewport by selecting the same actor again to trick the focus of viewport.
    2. Tried to call GetEditorMode()->ReceivedFocus() to focus on the current viewport client

    Any ideas?

    Issue also occurs in 4.22.

    #2
    Note: I have created a workaround for this by using a timer to update the value that was changed by the slider it self. Seems to be an issue related to how slate is waiting for a return from the OnValueChanged callback.

    Comment

    Working...
    X