[With fix] UE4.20 bug in SVirtualWindow / SlateWidgetHelper (ComboBox not working in WidgetComponent)

In our packaged application, we use ComboBox’es in WidgetComponent’s in VR. Those stopped working in the packaged version. Reason here being that in

bool FSlateWindowHelper::FindPathToWidget([...]) 

it tries to build the widget path up to first SWindow by checking widget->Advanced_IsWindow().
However, WidgetComponents do not have any SWindow’s in their hierachy, only SVirtualWindow, which do derive from SWindow but are not marked with bIsWindow = true. Therefore, when it reaches SVirtualWindow which does not have any parent widget anymore, it flushes the widgetPath and returns “false” for “no path existing”.

So my temporary fix would be to set bIsWindow = true in the Construct function of SVirtualWindow, or to add a seperate condition in Line 117

if (CurWidget->Advanced_IsWindow() || StaticCastSharedPtr<SVirtualWindow>(CurWidget))

And yes this was a PITA to debug :smiley:

For UE4 guys, to replicate:

Create a 3D WidgetComponent, add a combo box with entries, script a WidgetInteractionComponent together, throw that widget into the level, package in Shipping, try to click it.

Edit: I will file an official bug-report, I just wanted to post it here too, in case it can help someone until an official fix is released.

has this been addressed yet? I really don’t want to have to redo my project from a source build just to do this fix.

If you did report this to the bug tracker then thanks it will be helpful.