Skip to content

Commit

Permalink
Enable changing the selected filter using the arrow keys
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronwhite committed Jun 18, 2020
1 parent 0152c33 commit 32222fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/dialogs/viewfilterdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ void ViewFilterDialog::setPresenter(ViewFilterPresenter *presenter)
connect(ui->removeFilterButton, &QToolButton::clicked, [&]() {
myPresenter->removeSelectedFilter();
});
connect(ui->filterList, &QListWidget::itemClicked, [&](QListWidgetItem *) {
myPresenter->selectFilter(ui->filterList->currentRow());
connect(ui->filterList, &QListWidget::currentRowChanged, [&](int row) {
// Don't send selection events when the filter list is cleared during
// update().
if (row >= 0)
myPresenter->selectFilter(row);
});

connect(ui->nameLineEdit, &QLineEdit::textEdited, [&](const QString &s) {
Expand Down

0 comments on commit 32222fd

Please sign in to comment.