don't delete "" (#5135)

This commit is contained in:
ebbit1q 2024-10-19 13:06:18 +02:00 committed by GitHub
parent 038ce3dcec
commit 4865269a73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,6 +146,9 @@ void TabReplays::actOpenLocalReplay()
void TabReplays::actDeleteLocalReplay()
{
QModelIndex curLeft = localDirView->selectionModel()->currentIndex();
if (!curLeft.isValid())
return;
if (QMessageBox::warning(this, tr("Delete local file"),
tr("Are you sure you want to delete \"%1\"?").arg(localDirModel->fileName(curLeft)),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)