Skip to content

Commit

Permalink
fix: scroll to top of quest after the quest is selected (#1865)
Browse files Browse the repository at this point in the history
I don't know of a better way to do this in Swing
  • Loading branch information
pajlada authored Nov 24, 2024
1 parent 8ce774a commit 4866a55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/questhelper/panel/QuestHelperPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ public void addQuest(QuestHelper quest, boolean isActive)
questOverviewPanel.addQuest(quest, isActive);
questActive = true;

SwingUtilities.invokeLater(() -> scrollableContainer.getVerticalScrollBar().setValue(0));

repaint();
revalidate();
}
Expand Down

0 comments on commit 4866a55

Please sign in to comment.