mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 09:08:42 +00:00
Made main window hide on instace exit
This commit is contained in:
@@ -541,10 +541,21 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
|
||||
if(!proc)
|
||||
return;
|
||||
|
||||
// Prepare GUI: If it shall stay open disable the required parts
|
||||
if (globalSettings->get("NoHide").toBool())
|
||||
{
|
||||
ui->actionLaunchInstance->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->hide();
|
||||
}
|
||||
|
||||
console = new ConsoleWindow(proc);
|
||||
console->show();
|
||||
connect(proc, SIGNAL(log(QString, MessageLevel::Enum)),
|
||||
console, SLOT(write(QString, MessageLevel::Enum)));
|
||||
connect(proc, SIGNAL(ended()), this, SLOT(instanceEnded()));
|
||||
proc->launch();
|
||||
}
|
||||
|
||||
@@ -673,3 +684,9 @@ void MainWindow::on_actionEditInstNotes_triggered()
|
||||
linst->setNotes(noteedit.getText());
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::instanceEnded()
|
||||
{
|
||||
this->show();
|
||||
ui->actionLaunchInstance->setEnabled(m_selectedInstance);
|
||||
}
|
||||
|
Reference in New Issue
Block a user