Fix updating Label layout after font change when using automatic size

#380
This commit is contained in:
Wojtek Figat
2021-03-23 09:32:12 +01:00
parent e8c9856665
commit 16f81cc184

View File

@@ -77,7 +77,19 @@ namespace FlaxEngine.GUI
public FontReference Font
{
get => _font;
set => _font = value;
set
{
if (_font != value)
{
_font = value;
if (_autoWidth || _autoHeight || _autoFitText)
{
_textSize = Vector2.Zero;
PerformLayout();
}
}
}
}
/// <summary>