Fix: Recovery: Only show delete confirmation dialog if file/folder selected

This commit is contained in:
Sapour 2023-03-27 12:23:01 +01:00
parent ebf004d312
commit df03fb1e90
1 changed files with 4 additions and 1 deletions

View File

@ -242,7 +242,10 @@ void CRecoveryWindow::OnDelete()
{
QMap<QString, SRecItem> FileMap = GetFiles();
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete %1 selected files?").arg(FileMap.count()), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
if (FileMap.isEmpty())
return;
if (QMessageBox::Yes != QMessageBox("Sandboxie-Plus", tr("Do you really want to delete %1 selected files?").arg(FileMap.count()), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec())
return;
foreach(const QString & FilePath, FileMap.keys())