Fix opening a replay multiple times by quickly double clicking (fixes #25)

This commit is contained in:
johni0702
2016-11-10 20:52:07 +01:00
parent 9ff767b054
commit 0db1b9ef5a

View File

@@ -101,6 +101,8 @@ public class GuiReplayViewer extends GuiScreen {
}).onSelectionDoubleClicked(() -> { }).onSelectionDoubleClicked(() -> {
if (this.loadButton.isEnabled()) { if (this.loadButton.isEnabled()) {
this.loadButton.onClick(); 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); }).setDrawShadow(true).setDrawSlider(true);