mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 21:24:18 +01:00
Fix collection in use not updating on first load.
This commit is contained in:
parent
c097b634ab
commit
27650708f0
2 changed files with 6 additions and 2 deletions
|
|
@ -81,11 +81,14 @@ public partial class ModCollection
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentCollectionInUse = Characters.Values.Prepend( Default ).SelectMany( c => c.GetFlattenedInheritance() ).Contains( Current );
|
|
||||||
|
|
||||||
|
UpdateCurrentCollectionInUse();
|
||||||
CollectionChanged.Invoke( type, this[ oldCollectionIdx ], newCollection, characterName );
|
CollectionChanged.Invoke( type, this[ oldCollectionIdx ], newCollection, characterName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateCurrentCollectionInUse()
|
||||||
|
=> CurrentCollectionInUse = Characters.Values.Prepend( Default ).SelectMany( c => c.GetFlattenedInheritance() ).Contains( Current );
|
||||||
|
|
||||||
public void SetCollection( ModCollection collection, Type type, string? characterName = null )
|
public void SetCollection( ModCollection collection, Type type, string? characterName = null )
|
||||||
=> SetCollection( collection.Index, type, characterName );
|
=> SetCollection( collection.Index, type, characterName );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ public partial class ModCollection
|
||||||
CollectionChanged += SaveOnChange;
|
CollectionChanged += SaveOnChange;
|
||||||
ReadCollections();
|
ReadCollections();
|
||||||
LoadCollections();
|
LoadCollections();
|
||||||
|
UpdateCurrentCollectionInUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue