Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: synchronize questStepPanelList #1866

Merged
merged 3 commits into from
Nov 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/com/questhelper/panel/QuestOverviewPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.awt.event.ItemEvent;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
Expand Down Expand Up @@ -95,7 +96,7 @@ public class QuestOverviewPanel extends JPanel

private final JButton collapseBtn = new JButton();

private final List<QuestStepPanel> questStepPanelList = new ArrayList<>();
private final List<QuestStepPanel> questStepPanelList = new CopyOnWriteArrayList<>();

public QuestOverviewPanel(QuestHelperPlugin questHelperPlugin, QuestManager questManager)
{
Expand Down Expand Up @@ -255,6 +256,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
Loading