Fix UI with list of null items when layout gets rebuilt at item level

This commit is contained in:
Wojtek Figat
2021-08-12 11:47:38 +02:00
parent 916c2733f0
commit 3cf3f58db1
6 changed files with 60 additions and 19 deletions

View File

@@ -101,6 +101,22 @@ namespace FlaxEditor.CustomEditors
}
}
/// <summary>
/// Gets a value indicating whether all values in the collection are null. Returns true if collection is empty.
/// </summary>
public bool IsNull
{
get
{
for (int i = 0; i < Count; i++)
{
if (this[i] != null)
return false;
}
return true;
}
}
/// <summary>
/// Gets a value indicating whether this any value in the collection is of value type (eg. a structure, not a class type). Returns false if collection is empty.
/// </summary>