mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Add warning if the currently edited collection is not in use anywhere.
This commit is contained in:
parent
abd1fd14f5
commit
61680f0afb
4 changed files with 24 additions and 17 deletions
|
|
@ -20,6 +20,9 @@ public partial class ModCollection
|
|||
// The collection currently selected for changing settings.
|
||||
public ModCollection Current { get; private set; } = Empty;
|
||||
|
||||
// The collection currently selected is in use either as an active collection or through inheritance.
|
||||
public bool CurrentCollectionInUse { get; private set; }
|
||||
|
||||
// The collection used for general file redirections and all characters not specifically named.
|
||||
public ModCollection Default { get; private set; } = Empty;
|
||||
|
||||
|
|
@ -78,6 +81,8 @@ public partial class ModCollection
|
|||
break;
|
||||
}
|
||||
|
||||
CurrentCollectionInUse = Characters.Values.Prepend( Default ).SelectMany( c => c.GetFlattenedInheritance() ).Contains( Current );
|
||||
|
||||
CollectionChanged.Invoke( type, this[ oldCollectionIdx ], newCollection, characterName );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue