mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-28 21:00:20 +02:00
feat: prevent deletion of running instances (#3754)
This commit is contained in:
commit
bc9af29158
@ -1383,6 +1383,14 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_selectedInstance->isRunning()) {
|
||||
CustomMessageBox::selectable(this, tr("Cannot Delete Running Instance"),
|
||||
tr("The selected instance is currently running and cannot be deleted. Please stop the instance before "
|
||||
"attempting to delete it."),
|
||||
QMessageBox::Warning, QMessageBox::Ok)
|
||||
->exec();
|
||||
return;
|
||||
}
|
||||
auto id = m_selectedInstance->id();
|
||||
|
||||
auto response = CustomMessageBox::selectable(this, tr("Confirm Deletion"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user