Skip to content

Commit

Permalink
Prevent crash when removing records
Browse files Browse the repository at this point in the history
  • Loading branch information
vtronko committed May 14, 2016
1 parent 4faf6d2 commit 330af1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down

0 comments on commit 330af1a

Please sign in to comment.