diff options
author | 2019-02-18 12:47:20 -0800 | |
---|---|---|
committer | 2019-02-19 12:02:58 -0800 | |
commit | 3ff131b27dff7b0742094051f4262d2dd7d3322d (patch) | |
tree | 239798cf5499b2defd55d61571d7ff852eae86c2 /desktop-widgets/mainwindow.cpp | |
parent | 208b3bb9af8039ef0e2fc70e0e617c24db047e5d (diff) | |
download | subsurface-3ff131b27dff7b0742094051f4262d2dd7d3322d.tar.gz |
Desktop: show the filter information in the window title
Instead of using the filter widget itself to show the information how many
dives are displayed, put it in the window title where it's visible even if the
filter widget isn't shown.
If the filter is not active, simply show the total number of dives.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 4d3df6ccb..5095ab130 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -1636,7 +1636,8 @@ void MainWindow::setTitle() } QString unsaved = (unsaved_changes() ? " *" : ""); - setWindowTitle("Subsurface: " + displayedFilename(existing_filename) + unsaved); + QString shown = QString(" (%1)").arg(filterWidget2.shownText()); + setWindowTitle("Subsurface: " + displayedFilename(existing_filename) + unsaved + shown); } void MainWindow::importFiles(const QStringList fileNames) |