URichTextBlock::UpdateStyleData() does not check whether DecoratorClasses already had any specificed DecoratorClass. So every time you turn UMG on and off from the Viewport, Decorator Classes will increase indefinitely.
I propose that we add check code to a following code ( ex. URichTextBlock::GetDecoratorByClass )
void URichTextBlock::UpdateStyleData()void URichTextBlock::UpdateStyleData()
{
...
if (!ResolvedClass->HasAnyClassFlags(CLASS_Abstract))
{
URichTextBlockDecorator* Decorator = NewObject<URichTextBlockDecorator>(this, ResolvedClass);
InstanceDecorators.Add(Decorator);
}
result : DecoratorClasses of RichTextBlock has 2 instances.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-120641 in the post.
| 2 |
| Component | UE - Editor - UI Systems |
|---|---|
| Affects Versions | 4.26, 4.27 |
| Target Fix | 5.0 |
| Fix Commit | 17830851 |
|---|
| Created | Jul 29, 2021 |
|---|---|
| Resolved | Oct 15, 2021 |
| Updated | Nov 30, 2021 |