Fix render settings not saving when rendering (fixes #425)

Clicking Cancel or Add to Queue does save them but clicking Render does not.

This is caused by the fact that the GuiRenderSettings are now a popup and no
longer their own screen, so to close them, we need to call its close method, not
close the entire screen.
This commit is contained in:
Jonas Herzig
2020-11-22 14:51:48 +01:00
parent d4b7fdf949
commit 4739d2278b
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ public class GuiCreateScreenshot extends GuiRenderSettings implements Loadable {
buttonPanel.removeElement(queueButton);
renderButton.setI18nLabel("replaymod.gui.advancedscreenshots.create").onClick(() -> {
// Closing this GUI ensures that settings are saved
getMinecraft().openScreen(null);
close();
mod.runLater(() -> {
try {

View File

@@ -252,7 +252,7 @@ public class GuiRenderSettings extends AbstractGuiPopup<GuiRenderSettings> {
@Override
public void run() {
// Closing this GUI ensures that settings are saved
getMinecraft().openScreen(null);
close();
try {
VideoRenderer videoRenderer = new VideoRenderer(save(false), replayHandler, timeline);
videoRenderer.renderVideo();