diff options
Diffstat (limited to 'src/search/dolphinfacetswidget.cpp')
| -rw-r--r-- | src/search/dolphinfacetswidget.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index 35f0c67c1..08fe567b1 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -24,6 +24,7 @@ #include <QButtonGroup> #include <QCheckBox> #include <QDate> +#include <QEvent> #include <QHBoxLayout> #include <QRadioButton> @@ -106,15 +107,27 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : topLayout->addLayout(ratingLayout); topLayout->addStretch(); - m_anyType->setChecked(true); - m_anytime->setChecked(true); - m_anyRating->setChecked(true); + resetOptions(); } DolphinFacetsWidget::~DolphinFacetsWidget() { } +void DolphinFacetsWidget::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::EnabledChange && !isEnabled()) { + resetOptions(); + } +} + +void DolphinFacetsWidget::resetOptions() +{ + m_anyType->setChecked(true); + m_anytime->setChecked(true); + m_anyRating->setChecked(true); +} + QString DolphinFacetsWidget::ratingTerm() const { QStringList terms; |
