From fa2ba01a17c650e828b03d29622aadb3638e702f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 10 Dec 2013 23:48:20 +0100 Subject: [PATCH] Do not let the console close while Minecraft is running (prevent return to main window) --- gui/ConsoleWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index 5db4442ef..1a0f352d7 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -47,6 +47,7 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) { show(); } + setMayClose(false); } ConsoleWindow::~ConsoleWindow() @@ -174,6 +175,7 @@ void ConsoleWindow::onEnded(BaseInstance *instance, int code, QProcess::ExitStat } if(!isVisible()) show(); + setMayClose(true); } void ConsoleWindow::onLaunchFailed(BaseInstance *instance) @@ -181,6 +183,7 @@ void ConsoleWindow::onLaunchFailed(BaseInstance *instance) ui->btnKillMinecraft->setEnabled(false); if(!isVisible()) show(); + setMayClose(true); } void ConsoleWindow::on_btnPaste_clicked()