Fix UI with list of null items when layout gets rebuilt at item level
This commit is contained in:
@@ -30,6 +30,11 @@ namespace FlaxEditor.CustomEditors
|
||||
/// </summary>
|
||||
public readonly List<LayoutElement> Children = new List<LayoutElement>();
|
||||
|
||||
/// <summary>
|
||||
/// The child custom editors.
|
||||
/// </summary>
|
||||
public readonly List<CustomEditor> Editors = new List<CustomEditor>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the control represented by this element.
|
||||
/// </summary>
|
||||
@@ -722,6 +727,7 @@ namespace FlaxEditor.CustomEditors
|
||||
var customEditor = CustomEditor.CurrentCustomEditor;
|
||||
Assert.IsNotNull(customEditor);
|
||||
customEditor.OnChildCreated(editor);
|
||||
Editors.Add(editor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -730,6 +736,7 @@ namespace FlaxEditor.CustomEditors
|
||||
public virtual void ClearLayout()
|
||||
{
|
||||
Children.Clear();
|
||||
Editors.Clear();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user