Do not let the console close while Minecraft is running (prevent return to main window)

This commit is contained in:
Petr Mrázek 2013-12-10 23:48:20 +01:00
parent ab69c1b9e6
commit fa2ba01a17

View File

@ -47,6 +47,7 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent)
{ {
show(); show();
} }
setMayClose(false);
} }
ConsoleWindow::~ConsoleWindow() ConsoleWindow::~ConsoleWindow()
@ -174,6 +175,7 @@ void ConsoleWindow::onEnded(BaseInstance *instance, int code, QProcess::ExitStat
} }
if(!isVisible()) if(!isVisible())
show(); show();
setMayClose(true);
} }
void ConsoleWindow::onLaunchFailed(BaseInstance *instance) void ConsoleWindow::onLaunchFailed(BaseInstance *instance)
@ -181,6 +183,7 @@ void ConsoleWindow::onLaunchFailed(BaseInstance *instance)
ui->btnKillMinecraft->setEnabled(false); ui->btnKillMinecraft->setEnabled(false);
if(!isVisible()) if(!isVisible())
show(); show();
setMayClose(true);
} }
void ConsoleWindow::on_btnPaste_clicked() void ConsoleWindow::on_btnPaste_clicked()