Description

Since FDeprecateSlateVector2D has been implemented in 5.2, the following function calls will always fail. Therefore, the ImageSize is not updated.
This problem does not occur in 5.1.

    void SBrushResourceObjectBox::OnBrushResourceChanged()
    {
...
            // Update the image size to match that of the incoming new texture.
            // TODO: Should we always do this?  Or should we avoid doing it if there's already some 'set value'
            // problem is we don't have a way to track that right now.
            ImageSizeProperty->SetValue(CachedTextureSize);  // This function call fails
 

The following code works as a work around :

bool FPropertyHandleVector::Supports( TSharedRef<FPropertyNode> PropertyNode )
{
....
	if( StructProp && StructProp->Struct )
	{
		FName StructName = StructProp->Struct->GetFName();

		bSupported = StructName == NAME_Vector ||
#if 1  // workaround
			StructName == NAME_Vector2f ||
			StructName == FName("DeprecateSlateVector2D") ||
#endif

Steps to Reproduce
  1. Create Widget blueprint
  2. Place Image widget from the Palette window
  3. Select the Image widget and set a texture to Brush property
  4. See ImageSize property in detail pane

Result:

     ImageSize property is not set from the specified texture size

Expected Result:

    Update ImageSize from texture size

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-191666 in the post.

6
Login to Vote

Unresolved
ComponentUE - Editor - UI Systems - UMG
Affects Versions5.2
Target Fix5.5
CreatedAug 1, 2023
UpdatedDec 20, 2023
View Jira Issue