diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2017-12-24 14:35:59 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-12-26 13:08:49 -0800 |
commit | b6bf57a13b5e4d3dd469b0fa8790d341eb4f1304 (patch) | |
tree | e57922eee99f54276adec54d4f277c8f26e1d1ab /desktop-widgets/simplewidgets.cpp | |
parent | b86c70ab2ce91c46355a71008334aa6743caa1e6 (diff) | |
download | subsurface-b6bf57a13b5e4d3dd469b0fa8790d341eb4f1304.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index b63349819..f8cd96943 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -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); |