|
|
|
@ -34,8 +34,16 @@ void SellerDialog::on_deleteButton_clicked()
|
|
|
|
|
auto selModel = ui_.tableView->selectionModel();
|
|
|
|
|
if (selModel->hasSelection() == false)
|
|
|
|
|
return;
|
|
|
|
|
auto indexes = selModel->selectedRows();
|
|
|
|
|
|
|
|
|
|
auto dlgResult =
|
|
|
|
|
QMessageBox(QMessageBox::Icon::Warning, "Sind Sie sicher?",
|
|
|
|
|
"Löschen wirkt sich direkt auf die Datenbank aus. Möchten Sie fortfahren?",
|
|
|
|
|
QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, this)
|
|
|
|
|
.exec();
|
|
|
|
|
if (dlgResult == QMessageBox::No)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
auto indexes = selModel->selectedRows();
|
|
|
|
|
std::sort(indexes.begin(), indexes.end());
|
|
|
|
|
|
|
|
|
|
// Deleting the rows, beginning with the last one!
|
|
|
|
|