summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/filterwidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/filterwidget2.cpp')
-rw-r--r--desktop-widgets/filterwidget2.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp
index 592f016d1..5f78d6396 100644
--- a/desktop-widgets/filterwidget2.cpp
+++ b/desktop-widgets/filterwidget2.cpp
@@ -229,8 +229,16 @@ void FilterWidget2::filterDataChanged(const FilterData &data)
void FilterWidget2::countsChanged()
{
- ui.filterText->setText(tr("%L1/%L2 shown").arg(MultiFilterSortModel::instance()->divesDisplayed)
- .arg(dive_table.nr));
+ updateWindowTitle();
+}
+
+QString FilterWidget2::shownText()
+{
+ if (isActive())
+ return tr("%L1/%L2 shown").arg(MultiFilterSortModel::instance()->divesDisplayed)
+ .arg(dive_table.nr);
+ else
+ return tr("%L1 dives").arg(dive_table.nr);
}
bool FilterWidget2::isActive() const