Skip to content

Commit

Permalink
fix: clear questStepPanelList before adding panels from a new quest
Browse files Browse the repository at this point in the history
Before this, we kept adding and adding more panels, making the iteration over steps slower and slower
  • Loading branch information
pajlada committed Nov 24, 2024
1 parent c7456c1 commit 3646c00
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ private JPanel makeDropdownPanel(JComboBox dropdown, String name)
public void addQuest(QuestHelper quest, boolean isActive)
{
currentQuest = quest;
questStepPanelList.clear();

List<PanelDetails> steps = quest.getPanels();
QuestStep currentStep;
Expand Down

0 comments on commit 3646c00

Please sign in to comment.