From 0db1b9ef5adbdba26172c5e94333d0b25c21ac47 Mon Sep 17 00:00:00 2001 From: johni0702 Date: Thu, 10 Nov 2016 20:52:07 +0100 Subject: [PATCH] Fix opening a replay multiple times by quickly double clicking (fixes #25) --- .../java/com/replaymod/replay/gui/screen/GuiReplayViewer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java b/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java index 307238f3..b9ba3961 100755 --- a/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java +++ b/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java @@ -101,6 +101,8 @@ public class GuiReplayViewer extends GuiScreen { }).onSelectionDoubleClicked(() -> { if (this.loadButton.isEnabled()) { this.loadButton.onClick(); + // Disable load button to prevent the player from opening the replay twice at the same time + this.loadButton.setDisabled(); } }).setDrawShadow(true).setDrawSlider(true);