Change FontReference to reference type
FontReference is mutating itself by storing the cached font for later reuse, but this is not working as intended because FontReference is returned as a value type in UIControls so the cached font is actually stored in a copy of the FontReference and not in the original property.
This commit is contained in:
@@ -135,7 +135,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
/// <inheritdoc />
|
||||
protected override void UnlinkItem()
|
||||
{
|
||||
_textPreview.Font = new FontReference();
|
||||
_textPreview.Font = null;
|
||||
|
||||
base.UnlinkItem();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user