Fix InputImage not adjusting its layout if you switch to an image with a different size

This commit is contained in:
Steve Streeting 2020-10-16 15:11:44 +01:00
parent cbca5e9cc9
commit f6cd57c5ee

View File

@ -149,7 +149,11 @@ void UInputImage::UpdateImageFromTable(const FKey& InKey, const TSoftObjectPtr<U
// Rows are named the same as the key name
const auto SpriteRow = Table->FindRow<FKeySprite>(InKey.GetFName(), "Find Key Image");
if (SpriteRow)
SetBrushFromAtlasInterface(SpriteRow->Sprite);
{
// Match size is needed incase size has changed
// Need to make it update region in case inside a scale box or something else that needs to adjust
SetBrushFromAtlasInterface(SpriteRow->Sprite, true);
}
}
UUiTheme* UInputImage::GetTheme()