Skip to content

Commit

Permalink
canonicalize before counting items
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jun 28, 2024
1 parent d35ed9c commit f9b3d19
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ private void onMenuEntryAdded(MenuEntryAdded event)
if (event.getActionParam1() == ComponentID.BANK_ITEM_CONTAINER
&& activeTag != null && !tabInterface.isTagTabActive() && activeTag.layout() != null)
{

MenuEntry menu = event.getMenuEntry();
Widget w = menu.getWidget();
int itemId = w.getItemId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ private void onMenuEntryAdded(MenuEntryAdded event)
.onClick(this::opDuplicateItem);
}

if (activeTab.hasLayout() && activeTab.getLayout().count(event.getItemId()) > 1)
if (activeTab.hasLayout() && activeTab.getLayout().count(itemManager.canonicalize(event.getItemId())) > 1)
{
client.createMenuEntry(-1)
.setParam0(event.getActionParam0())
Expand Down

0 comments on commit f9b3d19

Please sign in to comment.