Right click on vertical header to delete the selected record(s)

The text is got from the "Delete record" button, so the text is updated to
"Delete records" when appropriate.

See feature request #1283
This commit is contained in:
mgrojo
2018-01-04 21:48:19 +01:00
parent 1be61dbb4f
commit 6f5e507556

View File

@@ -2452,6 +2452,13 @@ void MainWindow::showRecordPopupMenu(const QPoint& pos)
duplicateRecord(row);
});
QAction* deleteRecordAction = new QAction(ui->buttonDeleteRecord->text(), &popupRecordMenu);
popupRecordMenu.addAction(deleteRecordAction);
connect(deleteRecordAction, &QAction::triggered, [&]() {
deleteRecord();
});
popupRecordMenu.exec(ui->dataTable->verticalHeader()->mapToGlobal(pos));
}