3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Fix ram graph causing memory leak and add cleanup of options menu on reload

Dieser Commit ist enthalten in:
rtm516 2020-07-05 21:07:49 +01:00
Ursprung 4062f1ee55
Commit 5958b5d0ba
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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

Datei anzeigen

@ -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);