diff options
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 161f4f14a..192682774 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -577,7 +577,7 @@ MultiFilter::MultiFilter(QWidget *parent) : QScrollArea(parent) // Buttons to Clear/Minimize/Close QToolBar *tb = new QToolBar(); QToolButton *clearBtn = new QToolButton(); - clearBtn->setToolTip(tr("Clear the filters")); + clearBtn->setToolTip(tr("Reset the filters")); clearBtn->setIcon(QIcon(":/trash")); clearBtn->setAutoRaise(true); QToolButton *closeBtn = new QToolButton(); @@ -594,7 +594,7 @@ MultiFilter::MultiFilter(QWidget *parent) : QScrollArea(parent) tb->addWidget(minimize); tb->addWidget(closeBtn); - connect(closeBtn, SIGNAL(clicked(bool)), this, SLOT(hide())); + connect(closeBtn, SIGNAL(clicked(bool)), this, SLOT(closeFilter())); connect(clearBtn, SIGNAL(clicked(bool)), MultiFilterSortModel::instance(), SLOT(clearFilter())); l->addWidget(tb); l->addWidget(tagFilter); @@ -610,3 +610,9 @@ MultiFilter::MultiFilter(QWidget *parent) : QScrollArea(parent) setMinimumHeight(expandedWidget->height() + 5); } + +void MultiFilter::closeFilter() +{ + MultiFilterSortModel::instance()->clearFilter(); + hide(); +} |