Merge pull request #3376 from PrismLauncher/backport-3373-to-release-9.x

[Backport release-9.x] Show warning when adding new resources with no instances
This commit is contained in:
Alexandru Ionut Tripon 2025-01-31 23:04:21 +02:00 committed by GitHub
commit 2f889429da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1027,6 +1027,14 @@ void MainWindow::processURLs(QList<QUrl> urls)
continue;
}
if (APPLICATION->instances()->count() <= 0) {
CustomMessageBox::selectable(this, tr("No instance!"),
tr("No instance available to add the resource to.\nPlease create a new instance before "
"attempting to install this resource again."),
QMessageBox::Critical)
->show();
continue;
}
ImportResourceDialog dlg(localFileName, type, this);
if (dlg.exec() != QDialog::Accepted)