forked from GeyserMC/Geyser
Fix ram graph causing memory leak and add cleanup of options menu on reload
This commit is contained in:
parent
4062f1ee55
commit
5958b5d0ba
2 changed files with 4 additions and 3 deletions
|
@ -254,6 +254,7 @@ public class GeyserStandaloneGUI {
|
|||
*/
|
||||
public void setupInterface(GeyserStandaloneLogger geyserStandaloneLogger, GeyserCommandManager geyserCommandManager) {
|
||||
commandsMenu.removeAll();
|
||||
optionsMenu.removeAll();
|
||||
|
||||
for (Map.Entry<String, GeyserCommand> command : geyserCommandManager.getCommands().entrySet()) {
|
||||
// Remove the offhand command and any alias commands to prevent duplicates in the list
|
||||
|
|
|
@ -43,9 +43,9 @@ public final class GraphPanel extends JPanel {
|
|||
private final static int labelPadding = 25;
|
||||
private final static int pointWidth = 4;
|
||||
private final static int numberYDivisions = 10;
|
||||
private final static Color lineColor = new Color(44, 102, 230, 180);
|
||||
private final static Color pointColor = new Color(100, 100, 100, 180);
|
||||
private final static Color gridColor = new Color(200, 200, 200, 200);
|
||||
private final static Color lineColor = new Color(44, 102, 230, 255);
|
||||
private final static Color pointColor = new Color(100, 100, 100, 255);
|
||||
private final static Color gridColor = new Color(200, 200, 200, 255);
|
||||
private static final Stroke graphStroke = new BasicStroke(2f);
|
||||
private List<Integer> values = new ArrayList<>(10);
|
||||
|
||||
|
|
Loading…
Reference in a new issue