From 3646c0065c68c9ab25be532b9f99b651301e7110 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 24 Nov 2024 15:39:00 +0100 Subject: [PATCH] fix: clear questStepPanelList before adding panels from a new quest Before this, we kept adding and adding more panels, making the iteration over steps slower and slower --- src/main/java/com/questhelper/panel/QuestOverviewPanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java index 861669219a..a2ad8d7f9a 100644 --- a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java +++ b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java @@ -255,6 +255,7 @@ private JPanel makeDropdownPanel(JComboBox dropdown, String name) public void addQuest(QuestHelper quest, boolean isActive) { currentQuest = quest; + questStepPanelList.clear(); List steps = quest.getPanels(); QuestStep currentStep;