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.
This commit is contained in:
@@ -76,10 +76,7 @@ public class InfoBoxManager
|
|||||||
.compare(b1.getPriority(), b2.getPriority())
|
.compare(b1.getPriority(), b2.getPriority())
|
||||||
.compare(b1.getPlugin().getName(), b2.getPlugin().getName())
|
.compare(b1.getPlugin().getName(), b2.getPlugin().getName())
|
||||||
.result());
|
.result());
|
||||||
if (idx < 0)
|
infoBoxes.add(idx < 0 ? -idx - 1 : idx, infoBox);
|
||||||
{
|
|
||||||
infoBoxes.add(-idx - 1, infoBox);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferedImage image = infoBox.getImage();
|
BufferedImage image = infoBox.getImage();
|
||||||
|
|||||||
Reference in New Issue
Block a user