GH-2452 Ask before deleting group

This commit is contained in:
janrupf 2018-11-08 17:30:30 +01:00 committed by Petr Mrázek
parent 51a6883737
commit 3d630c7856

View File

@ -1478,7 +1478,12 @@ void MainWindow::deleteGroup()
QString groupName = map["group"].toString();
if(!groupName.isEmpty())
{
MMC->instances()->deleteGroup(groupName);
auto reply = QMessageBox::question(this, tr("Delete group"), tr("Are you sure you want to delete the group %1")
.arg(groupName), QMessageBox::Yes | QMessageBox::No);
if(reply == QMessageBox::Yes)
{
MMC->instances()->deleteGroup(groupName);
}
}
}