mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 00:08:51 -05:00
Fix InlineEditor recreated every frame for null values
This commit is contained in:
parent
821812b5f0
commit
5845f1758a
@ -86,12 +86,14 @@ namespace TriInspector.Elements
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_editor == null && _property.IsExpanded && !_property.IsValueMixed)
|
||||
var shouldDrawEditor = _property.IsExpanded && !_property.IsValueMixed;
|
||||
|
||||
if (_editor == null && shouldDrawEditor && _property.Value is Object obj && obj != null)
|
||||
{
|
||||
_editor = Editor.CreateEditor((Object) _property.Value);
|
||||
_editor = Editor.CreateEditor(obj);
|
||||
}
|
||||
|
||||
if (_editor != null && _property.IsExpanded && !_property.IsValueMixed)
|
||||
if (_editor != null && shouldDrawEditor)
|
||||
{
|
||||
Rect indentedEditorPosition;
|
||||
using (TriGuiHelper.PushIndentLevel())
|
||||
|
Loading…
Reference in New Issue
Block a user