feat: prevent deletion of running instances (#3754)

This commit is contained in:
Alexandru Ionut Tripon 2025-05-10 12:11:26 +03:00 committed by GitHub
commit bc9af29158
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"),