From 406c2bc7dbb8b9db70e8e525fb51aad5f3f56e0d Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 28 May 2020 00:13:32 -0400 Subject: [PATCH] infobox manager: fix adding multiple infoboxes of same priority The sort only checks infobox priority and plugin name, and is not a uniqeness check, so we still need to insert the infobox regardless of if it is "found" or not. --- .../runelite/client/ui/overlay/infobox/InfoBoxManager.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/infobox/InfoBoxManager.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/infobox/InfoBoxManager.java index b634800ea4..766b34c57c 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/infobox/InfoBoxManager.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/infobox/InfoBoxManager.java @@ -76,10 +76,7 @@ public class InfoBoxManager .compare(b1.getPriority(), b2.getPriority()) .compare(b1.getPlugin().getName(), b2.getPlugin().getName()) .result()); - if (idx < 0) - { - infoBoxes.add(-idx - 1, infoBox); - } + infoBoxes.add(idx < 0 ? -idx - 1 : idx, infoBox); } BufferedImage image = infoBox.getImage();