diff --git a/OtterGui b/OtterGui index cbf21c63..441d5f9b 160000 --- a/OtterGui +++ b/OtterGui @@ -1 +1 @@ -Subproject commit cbf21c639f91d39422b2d4b7244bd8d8c5d5d4d7 +Subproject commit 441d5f9b2943f8ab81501870314d9b1610cb3b51 diff --git a/Penumbra/UI/ConfigWindow.Misc.cs b/Penumbra/UI/ConfigWindow.Misc.cs index 9cc18bf4..38a98b50 100644 --- a/Penumbra/UI/ConfigWindow.Misc.cs +++ b/Penumbra/UI/ConfigWindow.Misc.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Numerics; @@ -114,7 +115,7 @@ public partial class ConfigWindow private sealed class CollectionSelector : FilterComboCache< ModCollection > { - public CollectionSelector( IEnumerable< ModCollection > items ) + public CollectionSelector( Func> items ) : base( items ) { } @@ -140,8 +141,8 @@ public partial class ConfigWindow => obj.Name; } - private static readonly CollectionSelector CollectionsWithEmpty = new(Penumbra.CollectionManager.OrderBy( c => c.Name ).Prepend( ModCollection.Empty )); - private static readonly CollectionSelector Collections = new(Penumbra.CollectionManager.OrderBy( c => c.Name )); + private static readonly CollectionSelector CollectionsWithEmpty = new(() => Penumbra.CollectionManager.OrderBy( c => c.Name ).Prepend( ModCollection.Empty ).ToList()); + private static readonly CollectionSelector Collections = new(() => Penumbra.CollectionManager.OrderBy( c => c.Name ).ToList()); // Draw a collection selector of a certain width for a certain type. private static void DrawCollectionSelector( string label, float width, CollectionType collectionType, bool withEmpty )