Fix regression in Content Item tooltip #1085

This commit is contained in:
Wojtek Figat
2023-05-24 09:47:27 +02:00
parent eb2fc0f02f
commit 47f9bc2017
2 changed files with 10 additions and 2 deletions

View File

@@ -384,7 +384,8 @@ namespace FlaxEditor.Content
protected virtual void OnBuildTooltipText(StringBuilder sb)
{
sb.Append("Type: ").Append(TypeDescription).AppendLine();
sb.Append("Size: ").Append(Utilities.Utils.FormatBytesCount((int)new FileInfo(Path).Length)).AppendLine();
if (File.Exists(Path))
sb.Append("Size: ").Append(Utilities.Utils.FormatBytesCount((int)new FileInfo(Path).Length)).AppendLine();
sb.Append("Path: ").Append(Utilities.Utils.GetAssetNamePathWithExt(Path)).AppendLine();
}
@@ -718,7 +719,7 @@ namespace FlaxEditor.Content
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
{
Focus();
// Open
(Parent as ContentView).OnItemDoubleClick(this);

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System.Text;
using FlaxEngine;
namespace FlaxEditor.Content
@@ -47,5 +48,11 @@ namespace FlaxEditor.Content
/// <inheritdoc />
protected override bool DrawShadow => true;
/// <inheritdoc />
public override void UpdateTooltipText()
{
TooltipText = null;
}
}
}