Fix console window (now not a QDialog)
It now opens and coloses as expected, depending on user preferences and the status of the various processes involved. Console window geometry and state are remembered between runs.
This commit is contained in:
@ -712,27 +712,10 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
|
||||
if (!proc)
|
||||
return;
|
||||
|
||||
// Prepare GUI: If it shall stay open disable the required parts
|
||||
if (MMC->settings()->get("NoHide").toBool())
|
||||
{
|
||||
ui->actionLaunchInstance->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->hide();
|
||||
}
|
||||
this->hide();
|
||||
|
||||
console = new ConsoleWindow(proc);
|
||||
|
||||
connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console,
|
||||
SLOT(write(QString, MessageLevel::Enum)));
|
||||
connect(proc, SIGNAL(ended(BaseInstance*,int,QProcess::ExitStatus)), this,
|
||||
SLOT(instanceEnded(BaseInstance*,int,QProcess::ExitStatus)));
|
||||
|
||||
if (instance->settings().get("ShowConsole").toBool())
|
||||
{
|
||||
console->show();
|
||||
}
|
||||
connect(console, SIGNAL(isClosing()), this, SLOT(instanceEnded()));
|
||||
|
||||
proc->setLogin(response.username, response.session_id);
|
||||
proc->launch();
|
||||
@ -884,15 +867,9 @@ void MainWindow::on_actionEditInstNotes_triggered()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::instanceEnded(BaseInstance *instance, int code, QProcess::ExitStatus status)
|
||||
void MainWindow::instanceEnded()
|
||||
{
|
||||
this->show();
|
||||
ui->actionLaunchInstance->setEnabled(m_selectedInstance);
|
||||
|
||||
if (instance->settings().get("AutoCloseConsole").toBool())
|
||||
{
|
||||
console->close();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::checkSetDefaultJava()
|
||||
|
Reference in New Issue
Block a user