mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Fix Remove Assignment being visible for base and interface.
This commit is contained in:
parent
5d1b17f96d
commit
f5d6ac8bdb
2 changed files with 4 additions and 1 deletions
|
|
@ -107,6 +107,9 @@ public static class CollectionTypeExtensions
|
|||
public static bool IsSpecial(this CollectionType collectionType)
|
||||
=> collectionType < CollectionType.Default;
|
||||
|
||||
public static bool CanBeRemoved(this CollectionType collectionType)
|
||||
=> collectionType.IsSpecial() || collectionType is CollectionType.Individual;
|
||||
|
||||
public static readonly (CollectionType, string, string)[] Special = Enum.GetValues<CollectionType>()
|
||||
.Where(IsSpecial)
|
||||
.Select(s => (s, s.ToName(), s.ToDescription()))
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ public sealed class CollectionPanel : IDisposable
|
|||
_active.SetCollection(ModCollection.Empty, type, _active.Individuals.GetGroup(identifier));
|
||||
}
|
||||
|
||||
if (collection != null)
|
||||
if (collection != null && type.CanBeRemoved())
|
||||
{
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Text, Colors.RegexWarningBorder);
|
||||
if (ImGui.MenuItem("Remove this assignment."))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue