Skip to content

Commit

Permalink
Remove deadcode ; delete keypress will never reach DockBookmark
Browse files Browse the repository at this point in the history
 Notice that eventFilter is attached to ui->tableViewFrequencyList that
 is only the frame border of the QTableView. To properly work it should
 be attached to ui->tableViewFrequencyList->viewport().

 In any case here, delete key press will be preempted by QShortcut
 defined in MainWindow class to clear the waterfall.
  • Loading branch information
0penBrain committed Oct 8, 2023
1 parent 5333015 commit 91df9de
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/qtgui/dockbookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,6 @@ bool DockBookmarks::eventFilter(QObject* object, QEvent* event)
{
ui->tableViewFrequencyList->clearSelection();
}
if (event->type() == QEvent::KeyPress)
{
QKeyEvent* pKeyEvent = static_cast<QKeyEvent *>(event);
if (pKeyEvent->key() == Qt::Key_Delete && ui->tableViewFrequencyList->hasFocus())
{
return DeleteSelectedBookmark();
}
}
return false;
}

Expand Down

0 comments on commit 91df9de

Please sign in to comment.