Skip to content

Commit

Permalink
Allow range selections
Browse files Browse the repository at this point in the history
The filter options can now be selected in a row (click an option and hold down)
  • Loading branch information
juuz0 committed Aug 10, 2023
1 parent 5e69025 commit 5179cb1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kiwixchoicebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ KiwixChoiceBox::KiwixChoiceBox(QWidget *parent) :
choiceSelector->setCurrentItem(m_defaultItem);
addSelection(m_defaultItem->text(), m_defaultItem->data(Qt::UserRole).toString());
}

for (auto &item : choiceSelector->selectedItems()) {
if (!m_choiceItems.contains(item->text())) {
addSelection(item->text(), item->data(Qt::UserRole).toString());
}
}
});

connect(choiceSearch, &QLineEdit::textChanged, [=](QString search) {
Expand Down

0 comments on commit 5179cb1

Please sign in to comment.