SubmitToolWidget.cpp:
/**** Description + Buttons ****/
DescriptionBox = SNew(SMultiLineEditableTextBox)
.Text_Lambda([&ModelInterface = ModelInterface]() { return FText::FromString(ModelInterface->GetCLDescription()); })
.OnTextChanged_Lambda([&ModelInterface = ModelInterface](const FText& newText) { ModelInterface->SetCLDescription(newText); })
.OnTextCommitted_Lambda([this](const FText& Text, ETextCommit::Type CommitType) { if(CommitType != ETextCommit::OnEnter) { ModelInterface->ValidateCLDescription(); }})
.AutoWrapText(true)
.IsReadOnly(false)
.IsEnabled_Static(&FModelInterface::GetInputEnabled);
This code binds the text to ModelInterface->GetCLDescription(), which gets swapped out by ModelInterface->SetCLDescription(). This can result in the description string that is bound to the UI becoming unbound by a background thread that alters the description (such as adding “#submittool” upon validation completion). A safer pattern would be to use a fixed string for the UI, and to prevent background threads from directly altering it except through AsyncTask() so as to make sure it isn’t altered while the UI is processing key strokes.
Is this something I should be altering locally, or is this something I should allow Epic to resolve (so as to prevent merge issues when I get future versions)?