Deselects Items in List after deleting Replay File using ReplayViewer

This commit is contained in:
CrushedPixel
2015-07-05 18:14:32 +02:00
parent 5f76577eed
commit 6e470fb812

View File

@@ -141,7 +141,9 @@ public class GuiReplayViewer extends GuiScreen implements GuiYesNoCallback {
fileReloader = new FileReloaderThread(); fileReloader = new FileReloaderThread();
fileReloader.start(); fileReloader.start();
} catch(Exception e) {} } catch(Exception e) {
e.printStackTrace();
}
this.createButtons(); this.createButtons();
} }
@@ -253,6 +255,7 @@ public class GuiReplayViewer extends GuiScreen implements GuiYesNoCallback {
} }
} }
@Override
public void confirmClicked(boolean result, int id) { public void confirmClicked(boolean result, int id) {
if(this.delete_file) { if(this.delete_file) {
this.delete_file = false; this.delete_file = false;
@@ -264,6 +267,7 @@ public class GuiReplayViewer extends GuiScreen implements GuiYesNoCallback {
e.printStackTrace(); e.printStackTrace();
} }
replayFileList.remove(replayGuiList.selected); replayFileList.remove(replayGuiList.selected);
replayGuiList.selected = -1;
} }
this.mc.displayGuiScreen(this); this.mc.displayGuiScreen(this);