Fix loading EnumValue with different int32

This commit is contained in:
Wojtek Figat
2021-07-12 11:10:12 +02:00
parent 27345e62a7
commit 716b726589

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.GUI;
namespace FlaxEditor.Surface.Elements
@@ -32,13 +33,13 @@ namespace FlaxEditor.Surface.Elements
Width = archetype.Size.X;
ParentNode = parentNode;
Archetype = archetype;
Value = (int)ParentNode.Values[Archetype.ValueIndex];
Value = Convert.ToInt32(ParentNode.Values[Archetype.ValueIndex]);
}
/// <inheritdoc />
protected override void OnValueChanged()
{
if ((int)ParentNode.Values[Archetype.ValueIndex] != (int)Value)
if (Convert.ToInt32(ParentNode.Values[Archetype.ValueIndex]) != (int)Value)
{
// Edit value
ParentNode.SetValue(Archetype.ValueIndex, Value);