mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Introduce negate-toggle buttons to filter lists
Introduce toggle buttons which mean "filter all dives except those fulfilling the selected criteria". The old code used to check for rowCount() == 0. This should never happen, because there is always a row "empty field". This check was moved into the preamble of the functions to seperate it from the actual logic. Fixes #435 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b86c70ab2c
commit
b6bf57a13b
4 changed files with 55 additions and 41 deletions
|
@ -516,6 +516,7 @@ FilterBase::FilterBase(FilterModelBase *model_, QWidget *parent) : QWidget(paren
|
|||
filter->setSourceModel(model);
|
||||
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString)));
|
||||
connect(ui.notButton, &QToolButton::toggled, model, &FilterModelBase::setNegate);
|
||||
ui.filterList->setModel(filter);
|
||||
|
||||
addContextMenuEntry(tr("Select All"), &FilterModelBase::selectAll);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue