- Title of Animation sample node gets updated when connection of animation reference box changes
This commit is contained in:
@@ -68,7 +68,7 @@ namespace FlaxEditor.Surface.Archetypes
|
|||||||
private void UpdateTitle()
|
private void UpdateTitle()
|
||||||
{
|
{
|
||||||
var asset = Editor.Instance.ContentDatabase.Find((Guid)Values[0]);
|
var asset = Editor.Instance.ContentDatabase.Find((Guid)Values[0]);
|
||||||
Title = asset?.ShortName ?? "Animation";
|
Title = _assetBox.HasAnyConnection || asset == null ? "Animation" : asset.ShortName;
|
||||||
var style = Style.Current;
|
var style = Style.Current;
|
||||||
Resize(Mathf.Max(230, style.FontLarge.MeasureText(Title).X + 30), 160);
|
Resize(Mathf.Max(230, style.FontLarge.MeasureText(Title).X + 30), 160);
|
||||||
}
|
}
|
||||||
@@ -82,6 +82,7 @@ namespace FlaxEditor.Surface.Archetypes
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_assetSelect.Visible = !box.HasAnyConnection;
|
_assetSelect.Visible = !box.HasAnyConnection;
|
||||||
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user