Skip to content

Commit

Permalink
Merge pull request sqlitebrowser#590 from innermous/patch-delete-record
Browse files Browse the repository at this point in the history
Prevent crash when removing records
  • Loading branch information
justinclift committed May 14, 2016
2 parents 4faf6d2 + 330af1a commit c943522
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 c943522

Please sign in to comment.