diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -50,6 +50,9 @@ explicit DolphinFacetsWidget(QWidget* parent = nullptr); ~DolphinFacetsWidget() override; + void setEnabled(bool enable); + void resetOptions(); + QString ratingTerm() const; QString facetType() const; diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -106,15 +106,26 @@ topLayout->addLayout(ratingLayout); topLayout->addStretch(); - m_anyType->setChecked(true); - m_anytime->setChecked(true); - m_anyRating->setChecked(true); + resetOptions(); } DolphinFacetsWidget::~DolphinFacetsWidget() { } +void DolphinFacetsWidget::setEnabled(bool enable) +{ + QWidget::setEnabled(enable); + resetOptions(); +} + +void DolphinFacetsWidget::resetOptions() +{ + m_anyType->setChecked(true); + m_anytime->setChecked(true); + m_anyRating->setChecked(true); +} + QString DolphinFacetsWidget::ratingTerm() const { QStringList terms; diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -530,6 +530,8 @@ setSearchPath(QUrl::fromLocalFile(QDir::homePath())); } + m_facetsWidget->resetOptions(); + setText(query.searchString()); QStringList types = query.types();