Merge pull request #590 from innermous/patch-delete-record

Prevent crash when removing records
This commit is contained in:
Justin Clift
2016-05-14 21:28:02 +01:00

View File

@@ -577,6 +577,10 @@ void MainWindow::deleteRecord()
{
if(ui->dataTable->selectionModel()->hasSelection())
{
// If only filter header is selected
if(ui->dataTable->selectionModel()->selectedIndexes().isEmpty())
return;
int old_row = ui->dataTable->currentIndex().row();
while(ui->dataTable->selectionModel()->hasSelection())
{