From 7ab5c7311c5e88175f672546d3f2c0717e913d1d Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Mon, 1 May 2023 18:43:27 +0200 Subject: [PATCH] Fix multiple context menus for collections with identical identifier names. --- Penumbra/UI/CollectionTab/CollectionPanel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Penumbra/UI/CollectionTab/CollectionPanel.cs b/Penumbra/UI/CollectionTab/CollectionPanel.cs index d18defa2..86742b3d 100644 --- a/Penumbra/UI/CollectionTab/CollectionPanel.cs +++ b/Penumbra/UI/CollectionTab/CollectionPanel.cs @@ -214,9 +214,9 @@ public sealed class CollectionPanel : IDisposable DrawSettingsList(collection); } - private void DrawContext(bool open, ModCollection? collection, CollectionType type, ActorIdentifier identifier, char suffix) + private void DrawContext(bool open, ModCollection? collection, CollectionType type, ActorIdentifier identifier, string text, char suffix) { - var label = $"{type}{identifier}{suffix}"; + var label = $"{type}{text}{suffix}"; if (open) ImGui.OpenPopup(label); @@ -274,7 +274,7 @@ public sealed class CollectionPanel : IDisposable var size = ImGui.CalcTextSize(name); var textPos = ImGui.GetItemRectMax() - size - ImGui.GetStyle().FramePadding; ImGui.GetWindowDrawList().AddText(textPos, ImGui.GetColorU32(ImGuiCol.Text), name); - DrawContext(button, collection, type, id, suffix); + DrawContext(button, collection, type, id, text, suffix); } if (hovered)